mirror of
https://github.com/python/cpython.git
synced 2025-10-04 22:20:46 +00:00
bpo-28911: Clarify the behaviour of assert_called_once_with. (#254)
(cherry picked from commit 9d56b34af2
)
This commit is contained in:
parent
0246422b97
commit
fa30453568
2 changed files with 8 additions and 7 deletions
|
@ -795,8 +795,8 @@ class NonCallableMock(Base):
|
|||
|
||||
|
||||
def assert_called_once_with(_mock_self, *args, **kwargs):
|
||||
"""assert that the mock was called exactly once and with the specified
|
||||
arguments."""
|
||||
"""assert that the mock was called exactly once and that that call was
|
||||
with the specified arguments."""
|
||||
self = _mock_self
|
||||
if not self.call_count == 1:
|
||||
msg = ("Expected '%s' to be called once. Called %s times." %
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue