MCPcopy Index your code
hub / github.com/python/cpython / assert_awaited

Method assert_awaited

Lib/unittest/mock.py:2361–2367  ·  view source on GitHub ↗

Assert that the mock was awaited at least once.

(self)

Source from the content-addressed store, hash-verified

2359 return self.return_value
2360
2361 def assert_awaited(self):
2362 """
2363 Assert that the mock was awaited at least once.
2364 """
2365 if self.await_count == 0:
2366 msg = f"Expected {self._mock_name or 'mock'} to have been awaited."
2367 raise AssertionError(msg)
2368
2369 def assert_awaited_once(self):
2370 """

Calls

no outgoing calls