[issue33643] Mock functions with autospec STILL don't support assert_called_once, assert_called, assert_not_called

Justin Dray report at bugs.python.org
Mon Oct 8 07:24:10 EDT 2018


Justin Dray <justin at dray.be> added the comment:

I can still reproduce this with python 3.6.5:

https://gist.github.com/justin8/c6a565d3b64222a9ba3a2568d1d830ee

no .assert_called() on autospec'd functions, but it works with normal mock.MagicMock()

ipython autocomplete shows assert_any_call, assert_called_once, assert_called_with and assert_has_calls as valid functions however?

----------
nosy: +Justin Dray

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33643>
_______________________________________


More information about the Python-bugs-list mailing list