New submission from Yannick Brehon:

If one defines a mock for a function, using autospec=True, then the mock will 
correctly support assert_called_once_with(), among others, but not 
assert_called_once, assert_called, and assert_not_called.
The attached file contains a fix for the issue.

----------
components: Library (Lib)
files: fix_autospecced_mock_functions.patch
keywords: patch
messages: 278208
nosy: Yannick Brehon
priority: normal
severity: normal
status: open
title: Mock functions with autospec don't support assert_called_once, 
assert_called, assert_not_called
type: behavior
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7
Added file: 
http://bugs.python.org/file44991/fix_autospecced_mock_functions.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28380>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to