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