Advertisements   
   

Improve Your Tests With the Python Mock Object Library – Real Python

Advertisements   
   

When you’re writing robust code, tests are essential for verifying that your application logic is correct, reliable, and efficient. However, the value of your tests depends on how well they demonstrate these criteria. Obstacles such as complex logic and unpredictable dependencies make writing valuable tests difficult. The Python mock object library, unittest.mock, can help you overcome these obstacles.

By the end of this course, you’ll be able to:

Advertisements   
   
  • Create Python mock objects using Mock
  • Assert that you’re using objects as you intended
  • Inspect usage data stored on your Python mocks
  • Configure certain aspects of your Python mock objects
  • Substitute your mocks for real objects using patch()
  • Avoid common problems inherent in Python mocking

You’ll begin by seeing what mocking is and how it will improve your tests!

Improve Your Tests With the Python Mock Object Library – Real Python, Free Tutorials Download

Download  Improve Your Tests With the Python Mock Object Library  Free

Go to Download Tutorials Page Go to HomePage Tutorials

Password : freetuts.download

Author: Ho Quang Dai

I am Ho Quang Dai, from Vietnam – A country that loves peace. I share completely free courses from major academic websites around the world. Hope to bring free knowledge to everyone who can’t afford to buy


Related Courses

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

Report Link Die

Please provide the most detailed information, we will re-upload as soon as possible