Issue 28380: Mock functions with autospec don't support assert_called_once, assert_called, assert_not_called (original) (raw)
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.