assert that the mock was called at least once
(self)
| 946 | raise AssertionError(msg) |
| 947 | |
| 948 | def assert_called(self): |
| 949 | """assert that the mock was called at least once |
| 950 | """ |
| 951 | if self.call_count == 0: |
| 952 | msg = ("Expected '%s' to have been called." % |
| 953 | (self._mock_name or 'mock')) |
| 954 | raise AssertionError(msg) |
| 955 | |
| 956 | def assert_called_once(self): |
| 957 | """assert that the mock was called only once. |
no outgoing calls