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)
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')
def test_brokenrule(self): rule = BrokenRule(self.miner, '', '') self.assertTrue(str(rule) == 'broke Test: ')