Mock object bug with assert_not_called

Diego Vela diego at vida.com
Tue Dec 27 15:15:01 EST 2016


Dear all,

>From reading the documentation it seemed like this is the place to post a
bug.  If not please let me know where is the proper place to do so.

Bug:
For mock objects created using the @patch decorator the following methods
are inconsistent.
assert_not_called,
assert_called_with

Steps
Create a mock object using the @patch decorator for a function.
call a function that that calls the mocked function.
check assert_not_called and assert_called with.

Thank you for your time.

-- 
Diego Vela


More information about the Python-list mailing list