@@ -275,14 +275,14 @@ the *new_callable* argument to :func:`patch`.
275275
276276 .. method :: assert_called_once_with(*args, **kwargs)
277277
278- Assert that the mock was called exactly once and with the specified
279- arguments.
278+ Assert that the mock was called exactly once and that that call was
279+ with the specified arguments.
280280
281281 >>> mock = Mock(return_value = None )
282282 >>> mock(' foo' , bar = ' baz' )
283283 >>> mock.assert_called_once_with(' foo' , bar = ' baz' )
284- >>> mock(' foo ' , bar = ' baz ' )
285- >>> mock.assert_called_once_with(' foo ' , bar = ' baz ' )
284+ >>> mock(' other ' , bar = ' values ' )
285+ >>> mock.assert_called_once_with(' other ' , bar = ' values ' )
286286 Traceback (most recent call last):
287287 ...
288288 AssertionError: Expected 'mock' to be called once. Called 2 times.
@@ -294,7 +294,8 @@ the *new_callable* argument to :func:`patch`.
294294
295295 The assert passes if the mock has *ever * been called, unlike
296296 :meth: `assert_called_with ` and :meth: `assert_called_once_with ` that
297- only pass if the call is the most recent one.
297+ only pass if the call is the most recent one, and in the case of
298+ :meth: `assert_called_once_with ` it must also be the only call.
298299
299300 >>> mock = Mock(return_value = None )
300301 >>> mock(1 , 2 , arg = ' thing' )
0 commit comments