summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2014-03-17 16:48:13 -0400
committerÉric Araujo <merwok@netwok.org>2014-03-17 16:48:13 -0400
commit0b1be1a3b12c7da952b6452973ad88ae3ef3705a (patch)
tree3d8f5def65becb5f27c1bcbc209bcfe1ea4b68e1
parent28a965ff71a00d89f37b88ca73ae61adf94de544 (diff)
downloadcpython-git-0b1be1a3b12c7da952b6452973ad88ae3ef3705a.tar.gz
Fix typo in example (#20963)
-rw-r--r--Doc/library/unittest.mock-examples.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/unittest.mock-examples.rst b/Doc/library/unittest.mock-examples.rst
index c5fa365afd..1c43bfe263 100644
--- a/Doc/library/unittest.mock-examples.rst
+++ b/Doc/library/unittest.mock-examples.rst
@@ -934,8 +934,8 @@ After the `MagicMock` has been used we can use attributes like
the magic methods you specifically want:
>>> mock = Mock()
- >>> mock.__setitem__ = Mock(side_effect=getitem)
- >>> mock.__getitem__ = Mock(side_effect=setitem)
+ >>> mock.__getitem__ = Mock(side_effect=getitem)
+ >>> mock.__setitem__ = Mock(side_effect=setitem)
A *third* option is to use `MagicMock` but passing in `dict` as the `spec`
(or `spec_set`) argument so that the `MagicMock` created only has