TST: failmanager get/sets on FailTotal and MaxTime

pull/370/head
Daniel Black 2013-09-29 15:12:44 +10:00
parent bcc16789d0
commit 723ea964a7
1 changed files with 11 additions and 1 deletions

View File

@ -53,8 +53,18 @@ class AddFailure(unittest.TestCase):
def tearDown(self): def tearDown(self):
"""Call after every test case.""" """Call after every test case."""
def testAdd(self): def testFailManagerAdd(self):
self.assertEqual(self.__failManager.size(), 3) self.assertEqual(self.__failManager.size(), 3)
self.assertEqual(self.__failManager.getFailTotal(), 13)
self.__failManager.setFailTotal(0)
self.assertEqual(self.__failManager.getFailTotal(), 0)
self.__failManager.setFailTotal(13)
def testFailManagerMaxTime(self):
self.assertEqual(self.__failManager.getMaxTime(), 600)
self.__failManager.setMaxTime(13)
self.assertEqual(self.__failManager.getMaxTime(), 13)
self.__failManager.setMaxTime(600)
def _testDel(self): def _testDel(self):
self.__failManager.delFailure('193.168.0.128') self.__failManager.delFailure('193.168.0.128')