def test_allow(self): route = Route('66', self.exec_sys, [self.rule_true]) self.assertTrue(route.allow(self.job)) route.append(self.rule_false) self.assertFalse(route.allow(self.job))
def test_append(self): route = Route('66', self.exec_sys) self.assertEqual(route.rules, []) route.append(self.rule_true) self.assertEqual(route.rules, [self.rule_true])