[New-bugs-announce] [issue21692] Wrong order of expected/actual for assert_called_once_with
Fei Long Wang
report at bugs.python.org
Sun Jun 8 09:37:07 CEST 2014
New submission from Fei Long Wang:
>>> m=mock.Mock()
>>> m.some_method('foo', 'bar')
<Mock name='mock.some_method()' id='140353787504656'>
>>> m.some_method.assert_called_once_with('foo', 'bar')
>>> m.some_method.assert_called_once_with('foo', 'baz')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/mock.py", line 846, in assert_called_once_with
return self.assert_called_with(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/mock.py", line 835, in assert_called_with
raise AssertionError(msg)
AssertionError: Expected call: some_method('foo', 'baz') #####
Actual call: some_method('foo', 'bar') #####
>>>
----------
components: Tests
messages: 220025
nosy: flwang
priority: normal
severity: normal
status: open
title: Wrong order of expected/actual for assert_called_once_with
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21692>
_______________________________________
More information about the New-bugs-announce
mailing list