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