Example #1
0
 def test_only_one_reboot(self):
     rules = MinerStatisticsRule(self.miner, None, None)
     rules.addbrokenrule(BrokenRule(self.miner, 'restart', 'reboot'))
     rules.addbrokenrule(BrokenRule(self.miner, 'restart', 'reboot'))
     self.assertTrue(len(rules.brokenrules) == 1)
Example #2
0
 def test_reset_leaves_reboot(self):
     rules = MinerStatisticsRule(self.miner, None, None)
     rules.addbrokenrule(BrokenRule(self.miner, 'restart', 'reboot'))
     rules.addbrokenrule(BrokenRule(self.miner, 'restart', ''))
     self.assertTrue(len(rules.brokenrules) == 1)
     self.assertTrue(rules.brokenrules[0].parameter == 'reboot')
Example #3
0
 def test_brokenrule(self):
     rule = BrokenRule(self.miner, '', '')
     self.assertTrue(str(rule) == 'broke Test: ')