I\'m using the Mock library to test my application, but I want to assert that some function was not called. Mock docs talk about methods like mock.assert_called_with>
mock.assert_called_with>
Though an old question, I would like to add that currently mock library (backport of unittest.mock) supports assert_not_called method.
mock
assert_not_called
Just upgrade yours;
pip install mock --upgrade