Assert that the mock was awaited exactly once.
(self)
| 2367 | raise AssertionError(msg) |
| 2368 | |
| 2369 | def assert_awaited_once(self): |
| 2370 | """ |
| 2371 | Assert that the mock was awaited exactly once. |
| 2372 | """ |
| 2373 | if not self.await_count == 1: |
| 2374 | msg = (f"Expected {self._mock_name or 'mock'} to have been awaited once." |
| 2375 | f" Awaited {self.await_count} times.") |
| 2376 | raise AssertionError(msg) |
| 2377 | |
| 2378 | def assert_awaited_with(self, /, *args, **kwargs): |
| 2379 | """ |
no outgoing calls