[issue38763] mock with side effect : assert_called_once returns None while call_count returns 1

Troulet-lambert Odile report at bugs.python.org
Sun Nov 10 17:09:23 EST 2019


New submission from Troulet-lambert Odile <piscvau at yahoo.fr>:

Using a mock with side_effect, I would expect that assert_called_once returns True if the mock has been called.
Yet it returns None while call_count== 1 returns True.

If this is not a bug, I would welcome some explanation in the documentation.

----------
components: Tests
files: bugmock.tar
messages: 356341
nosy: piscvau
priority: normal
severity: normal
status: open
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file48706/bugmock.tar

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


More information about the Python-bugs-list mailing list