def assert_awaited_once(_mock_self, *args, **kwargs):
    """
        Assert that the mock was awaited exactly once.

        .. versionadded:: 0.12
        """
    self = _mock_self
    if not self.await_count == 1:
        msg = "Expected '%s' to have been awaited once. Awaited %s times." % (
            self._mock_name or 'mock', self.await_count)
        raise AssertionError(msg)
