Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Doc/library/unittest.mock.rst
Original file line number Diff line number Diff line change
@@ -2654,9 +2654,9 @@ with any methods on the mock:

.. code-block:: pycon

>>> mock.has_data()
>>> mock.header_items()
<mock.Mock object at 0x...>
>>> mock.has_data.assret_called_with() # Intentional typo!
>>> mock.header_items.assret_called_with() # Intentional typo!

Auto-speccing solves this problem. You can either pass ``autospec=True`` to
:func:`patch` / :func:`patch.object` or use the :func:`create_autospec` function to create a
Loading
Oops, something went wrong.