Fixed crash comparing CheckMessage objects to non-CheckMessage objects.

This commit is contained in:
Adam Chainz 2016-08-05 14:18:12 +01:00 committed by Tim Graham
parent 68b580323b
commit 19e20a2a3f
2 changed files with 9 additions and 2 deletions

View file

@ -124,6 +124,10 @@ class MessageTests(SimpleTestCase):
e2 = Error("Error2", obj=SimpleModel)
self.assertNotEqual(e1, e2)
def test_not_equal_to_non_check(self):
e = Error("Error", obj=DummyObj())
self.assertNotEqual(e, 'a string')
def simple_system_check(**kwargs):
simple_system_check.kwargs = kwargs