Assert the mock has ever been awaited with the specified arguments.
(self, /, *args, **kwargs)
| 2405 | return self.assert_awaited_with(*args, **kwargs) |
| 2406 | |
| 2407 | def assert_any_await(self, /, *args, **kwargs): |
| 2408 | """ |
| 2409 | Assert the mock has ever been awaited with the specified arguments. |
| 2410 | """ |
| 2411 | expected = self._call_matcher(_Call((args, kwargs), two=True)) |
| 2412 | cause = expected if isinstance(expected, Exception) else None |
| 2413 | actual = [self._call_matcher(c) for c in self.await_args_list] |
| 2414 | if cause or expected not in _AnyComparer(actual): |
| 2415 | expected_string = self._format_mock_call_signature(args, kwargs) |
| 2416 | raise AssertionError( |
| 2417 | '%s await not found' % expected_string |
| 2418 | ) from cause |
| 2419 | |
| 2420 | def assert_has_awaits(self, calls, any_order=False): |
| 2421 | """ |