def assert_called_once_with(_mock_self, *args, **kwargs):
    """assert that the mock was called exactly once and that that call was
        with the specified arguments."""
    self = _mock_self
    if not self.call_count == 1:
        msg = "Expected '%s' to be called once. Called %s times.%s" % (self
            ._mock_name or 'mock', self.call_count, self._calls_repr())
        raise AssertionError(msg)
    return self.assert_called_with(*args, **kwargs)
