'assert that the mock was called with the specified arguments.
Raises an AssertionError if the args and keyword args passed in are
different to the last call to the mock.'

def assert_called_with(_mock_self, *args, **kwargs):

    self = _mock_self
    if (self.call_args is None):
        expected = self._format_mock_call_signature(args, kwargs)
        raise AssertionError(('Expected    call:    %s\nNot    called' % (expected,)))
    if (self.call_args != (args, kwargs)):
        msg = self._format_mock_failure_message(args, kwargs)
        raise AssertionError(msg)
