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 <rep...@bugs.python.org> <http://bugs.python.org/issue21692> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com