assert that the mock was never called.
(self)
| 936 | return _call |
| 937 | |
| 938 | def assert_not_called(self): |
| 939 | """assert that the mock was never called. |
| 940 | """ |
| 941 | if self.call_count != 0: |
| 942 | msg = ("Expected '%s' to not have been called. Called %s times.%s" |
| 943 | % (self._mock_name or 'mock', |
| 944 | self.call_count, |
| 945 | self._calls_repr())) |
| 946 | raise AssertionError(msg) |
| 947 | |
| 948 | def assert_called(self): |
| 949 | """assert that the mock was called at least once |