def test_returns_mismatch_when_does_not_match(self): mock = Mock() mock(1, 2, a=5) matcher = MockCalledWith(9, 2, a=5) result = matcher.match(mock) self.assertMismatch(result, "Expected call:")
def test_returns_none_when_matches(self): mock = Mock() mock(1, 2, frob=5, nob=6) matcher = MockCalledWith(1, 2, frob=5, nob=6) result = matcher.match(mock) self.assertIsNone(result)