def assert_not_called(_mock_self):
    """assert that the mock was never called.
        """
    self = _mock_self
    if self.call_count != 0:
        msg = "Expected '%s' to not have been called. Called %s times.%s" % (
            self._mock_name or 'mock', self.call_count, self._calls_repr())
        raise AssertionError(msg)
