diff options
author | Michael Foord <michael@voidspace.org.uk> | 2012-03-28 14:49:08 (GMT) |
---|---|---|
committer | Michael Foord <michael@voidspace.org.uk> | 2012-03-28 14:49:08 (GMT) |
commit | 324b58bf1824beae8f3d6891da525a7c98b72f80 (patch) | |
tree | 61ed9d2d2eb481a33c5a142d1f53b449a16bd364 /Doc/library | |
parent | aa8ec7e076893aaf50ae09956e8a6984985c5cc4 (diff) | |
download | cpython-324b58bf1824beae8f3d6891da525a7c98b72f80.zip cpython-324b58bf1824beae8f3d6891da525a7c98b72f80.tar.gz cpython-324b58bf1824beae8f3d6891da525a7c98b72f80.tar.bz2 |
Update unittest.mock.patch example
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/unittest.mock.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst index 153dcab..8bb37dc 100644 --- a/Doc/library/unittest.mock.rst +++ b/Doc/library/unittest.mock.rst @@ -988,10 +988,10 @@ patch the decorated function: >>> @patch('__main__.SomeClass') - ... def function(mock_class): + ... def function(normal_argument, mock_class): ... print(mock_class is SomeClass) ... - >>> function() + >>> function(None) True Patching a class replaces the class with a `MagicMock` *instance*. If the |