Exemplo n.º 1
0
 def test_set_remark(self, generic_rule: RuleGeneric):
     generic_rule.remark = "Test"
     assert generic_rule.remark == ["Test"]
     generic_rule.remark = ["Line 1", "Line 2"]
     assert generic_rule.remark == ["Line 1", "Line 2"]
     generic_rule.remark = None
     assert generic_rule.remark == []
     with pytest.raises(TypeError):
         generic_rule.remark = 6
     with pytest.raises(TypeError):
         generic_rule.remark = {1: "Line", 2: "Line"}
Exemplo n.º 2
0
 def generic_rule(self):
     rule = RuleGeneric()
     rule.src = "192.168.23.0/24"
     rule.dst = "192.168.24.0/24"
     rule.permit = True
     rule.active = False
     rule.objectid = 1234567
     rule.is_access_rule = True
     rule.logging.interval = 60
     rule.logging.level = "Debugging"
     rule.protocol = 88
     rule.remark = "EIGRP Test Rule"
     rule.position = 17
     return rule