Professional Python Testing with Mocks

46,081
0
Published 2023-07-03
In this video, we learn how to professionally test Python code with mocks.

◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚
🐍 The Python Bible Book: www.neuralnine.com/books/
💻 The Algorithm Bible Book: www.neuralnine.com/books/
👕 Programming Merch: www.neuralnine.com/shop

💼 Services 💼
💻 Freelancing & Tutoring: www.neuralnine.com/services

🌐 Social Media & Contact 🌐
📱 Website: www.neuralnine.com/
📷 Instagram: www.instagram.com/neuralnine
🐦 Twitter: twitter.com/neuralnine
🤵 LinkedIn: www.linkedin.com/company/neuralnine/
📁 GitHub: github.com/NeuralNine
🎙 Discord: discord.gg/JU4xr8U3dm

All Comments (21)
  • @20ted09
    This is now my GO TO channel for python. Absolutely top class tutorials!
  • @justmogen7383
    the explanation from beginning is awesome mahn! Very concise
  • English is my second language and the explainings are so clear that I understood everything in this tutorial. Very well explained and examplified. Thank you so much.
  • Most people don't use mocks and they just hope that the database or the internet or whatever other service works during the test run phase. A good use case is when there is expected to get a reponse from the user like in the input() function, the test would just wait until someone input some data and press enter. Mocking the input() function allows the test to run uninterrupted.
  • @highradqa
    You're my champion from now on dude. Great vid !!!!!!!
  • @eugenmalatov5470
    The introduction was excellent. But then I do not understand the first example. The individual lines are not really very well explained. How does the assert_called_with work, and why does it send an error?
  • @mohitmansi11
    Very well explained. Please come up with more such videos and examples. Thanks .
  • Very good. I would like to see more videos about mocks but using magic mock
  • @thee_apedo_guy
    That was sensational, feeling 🏋️‍♀️🏋️‍♀️
  • @Deepu1014
    What is MagicMock? Can you show small demo with it?
  • thank you for the nice video. if I use pytest, what is the mock lib you recommend?
  • @dsinghr
    this was very helpful. Is there a follow up video for more such examples? thanks
  • @CristianMolina
    Also, to test error conditions it's great to use mocks on the dependencies