]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2353] Use assertIn() in some places
authorMukund Sivaraman <muks@isc.org>
Thu, 29 Nov 2012 02:35:33 +0000 (08:05 +0530)
committerMukund Sivaraman <muks@isc.org>
Thu, 29 Nov 2012 02:44:42 +0000 (08:14 +0530)
src/bin/bind10/tests/bind10_test.py.in

index 93041c775eb60b52c2956b56ace3589902a1b733..918d3ebe0d4b2772c730966068e2428dd30d3aea 100644 (file)
@@ -1446,14 +1446,14 @@ class TestBossComponents(unittest.TestCase):
         bob._component_configurator._components['test'] = (None, component)
         self.__setup_restart(bob, component)
         self.assertTrue(component.restarted)
-        self.assertFalse(component in bob.components_to_restart)
+        self.assertNotIn(component, bob.components_to_restart)
 
         # Remove the component from the configuration.  It won't be restarted
         # even if scheduled, nor will remain in the to-be-restarted list.
         del bob._component_configurator._components['test']
         self.__setup_restart(bob, component)
         self.assertFalse(component.restarted)
-        self.assertFalse(component in bob.components_to_restart)
+        self.assertNotIn(component, bob.components_to_restart)
 
     def test_get_processes(self):
         '''Test that procsses are returned correctly, sorted by pid.'''
@@ -1491,12 +1491,12 @@ class TestBossComponents(unittest.TestCase):
         component.has_failed = failed
         bob.components[53] = component
 
-        self.assertFalse(component in bob.components_to_restart)
+        self.assertNotIn(component, bob.components_to_restart)
 
         bob.reap_children()
 
         if runnable and is_running and not failed:
-            self.assertTrue(component in bob.components_to_restart)
+            self.assertIn(component, bob.components_to_restart)
         else:
             self.assertEqual([], bob.components_to_restart)