summaryrefslogtreecommitdiffstats
path: root/Doc/library/unittest.mock.rst
diff options
context:
space:
mode:
authorMichael Foord <michael@voidspace.org.uk>2012-03-28 14:49:08 (GMT)
committerMichael Foord <michael@voidspace.org.uk>2012-03-28 14:49:08 (GMT)
commit324b58bf1824beae8f3d6891da525a7c98b72f80 (patch)
tree61ed9d2d2eb481a33c5a142d1f53b449a16bd364 /Doc/library/unittest.mock.rst
parentaa8ec7e076893aaf50ae09956e8a6984985c5cc4 (diff)
downloadcpython-324b58bf1824beae8f3d6891da525a7c98b72f80.zip
cpython-324b58bf1824beae8f3d6891da525a7c98b72f80.tar.gz
cpython-324b58bf1824beae8f3d6891da525a7c98b72f80.tar.bz2
Update unittest.mock.patch example
Diffstat (limited to 'Doc/library/unittest.mock.rst')
-rw-r--r--Doc/library/unittest.mock.rst4
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