Add import of `unittest.mock.Mock` in documentation (#102346)

This commit is contained in:
Wagner Alberto 2023-03-03 14:25:31 -03:00 committed by GitHub
parent 7b9132057d
commit cb944d0be8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -72,6 +72,7 @@ available, and then make assertions about how they have been used:
:attr:`side_effect` allows you to perform side effects, including raising an
exception when a mock is called:
>>> from unittest.mock import Mock
>>> mock = Mock(side_effect=KeyError('foo'))
>>> mock()
Traceback (most recent call last):