Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set your subtitle preferences in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.
The Mock Library
00:00 Now that you understand what mocking is and why it’s useful for testing, you’re probably wondering how can you use mocks, and you want to write some code and see how this works.
Mock object comes from
unittest.mock, and this is built into Python 3.3 and above. If you’re using a version older than that, then you can just do a
pip install mock.
It provides the
Mock class, which we’re going to use a lot throughout this course, and it also provides the
patch() method, which is used to patch objects—in other words, create mocks out of real objects.
Become a Member to join the conversation.