doc: fix a typo in unittest.mock.rst (GH-30227) (GH-30263)

(cherry picked from commit 10bf0a9ac3)

Co-authored-by: Joe <nigelchiang@outlook.com>
This commit is contained in:
Miss Islington (bot) 2021-12-26 03:51:57 -08:00 committed by GitHub
parent bee660e46a
commit f1f54c8fb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1515,7 +1515,7 @@ attribute in a class) that does not exist will fail with :exc:`AttributeError`::
>>> test()
Traceback (most recent call last):
...
AttributeError: <module 'sys' (built-in)> does not have the attribute 'non_existing'
AttributeError: <module 'sys' (built-in)> does not have the attribute 'non_existing_attribute'
but adding ``create=True`` in the call to :func:`patch` will make the previous example
work as expected::