.. method:: assert_called_with(*args, **kwargs)
- This method is a convenient way of asserting that calls are made in a
- particular way:
+ This method is a convenient way of asserting that the last call has been
+ made in a particular way:
>>> mock = Mock()
>>> mock.method(1, 2, 3, test='wow')
raise AssertionError(msg)
def assert_called_with(self, /, *args, **kwargs):
- """assert that the mock was called with the specified arguments.
+ """assert that the last call was made with the specified arguments.
Raises an AssertionError if the args and keyword args passed in are
different to the last call to the mock."""