[issue26752] Mock(2.0.0).assert_has_calls() raise AssertionError in two same calls
Guillaume Boily
report at bugs.python.org
Thu Nov 16 12:50:57 EST 2017
Guillaume Boily <guboi72 at gmail.com> added the comment:
As pointed here: https://github.com/testing-cabal/mock/issues/353,
this issue is related to the method assert_has_calls or probably any calls that use the method _call_matcher to match calls. Given that you mock a class and spec it, since we always bind to the _spec_signature (e.g. the constructor signature), when it is a method call then it bind() throws a TypeError looking like `missing a require argument`. A possible solution would be to include method signatures into the spec.
----------
components: +Tests
nosy: +guboi72
versions: +Python 3.6 -Python 2.7, Python 3.4
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26752>
_______________________________________
More information about the Python-bugs-list
mailing list