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