Parcourir la source

[2353] Check remove_socket_srv() with different states of BoB._srv_socket

Mukund Sivaraman il y a 12 ans
Parent
commit
67f4798a8a
1 fichiers modifiés avec 8 ajouts et 0 suppressions
  1. 8 0
      src/bin/bind10/tests/bind10_test.py.in

+ 8 - 0
src/bin/bind10/tests/bind10_test.py.in

@@ -406,6 +406,14 @@ class TestBoB(unittest.TestCase):
         self.assertFalse(os.path.exists(bob._socket_path))
         self.assertFalse(os.path.isdir(bob._tmpdir))
 
+        # These should not fail either:
+
+        # second call
+        bob.remove_socket_srv()
+
+        bob._srv_socket = None
+        bob.remove_socket_srv()
+
     def test_init_alternate_socket(self):
         bob = BoB("alt_socket_file")
         self.assertEqual(bob.verbose, False)