def assert_awaited_once(_mock_self):
    """
        Assert that the mock was awaited exactly once.
        """
    self = _mock_self
    if not self.await_count == 1:
        msg = (
            f"Expected {self._mock_name or 'mock'} to have been awaited once. Awaited {self.await_count} times."
            )
        raise AssertionError(msg)
