]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2439] Add missing isinstance
authorMichal 'vorner' Vaner <michal.vaner@nic.cz>
Mon, 28 Jan 2013 12:51:45 +0000 (13:51 +0100)
committerMichal 'vorner' Vaner <michal.vaner@nic.cz>
Mon, 28 Jan 2013 12:51:45 +0000 (13:51 +0100)
We check the result is of correct type, so use isinstance. It is unclear
how the original code could pass, though.

src/lib/python/isc/xfrin/tests/diff_tests.py

index 0b4b91f140c60ca4d341d6ac0f4711ec4ae6799e..f013cd5a137bd0710fbb68a7520b0e0cfeb55633 100644 (file)
@@ -1128,7 +1128,7 @@ class DiffTest(unittest.TestCase):
         self.assertEqual(1, len(self.__data_operations))
         self.assertEqual('add', self.__data_operations[0][0])
         # Check the returned one is actually RRsetCollection
-        self.assertTrue(collection, self.Collection)
+        self.assertTrue(isinstance(collection, self.Collection))
         # The collection is just the mock from above, so this doesn't do much
         # testing, but we check that the mock got through and didn't get hurt.
         self.assertIsNone(collection.find(Name('example.org'), RRClass.IN(),