]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2856] Test that the state doesn't change when an exception is raised
authorMukund Sivaraman <muks@isc.org>
Mon, 8 Jul 2013 12:29:37 +0000 (17:59 +0530)
committerMukund Sivaraman <muks@isc.org>
Mon, 8 Jul 2013 12:29:37 +0000 (17:59 +0530)
src/lib/python/isc/memmgr/tests/datasrc_info_tests.py

index e81f89ca9ccd9b9d6aa124d80db54f19afe9fdbd..95057c8bc24636dda9c08b5e9e1fa809b00cf6ae 100644 (file)
@@ -160,6 +160,7 @@ class TestSegmentInfo(unittest.TestCase):
         # in READY state
         self.__si_to_ready_state()
         self.assertRaises(SegmentInfoError, self.__sgmt_info.complete_update)
+        self.assertEqual(self.__sgmt_info.get_state(), SegmentInfo.READY)
 
         # in UPDATING state this is the same as calling
         # self.__si_to_synchronizing_state(), but let's try to be
@@ -181,6 +182,7 @@ class TestSegmentInfo(unittest.TestCase):
         # in SYNCHRONIZING state
         self.__si_to_synchronizing_state()
         self.assertRaises(SegmentInfoError, self.__sgmt_info.complete_update)
+        self.assertEqual(self.__sgmt_info.get_state(), SegmentInfo.SYNCHRONIZING)
 
         # in COPYING state
         self.__si_to_copying_state()