Пример #1
0
 def test_bad_protocol_with_ports(self):
     with self.assertRaises(AssertionError):
         _rule_to_iptables_fragment("foo", {"protocol": "10",
                                            "src_ports": [1]}, 4, {})
Пример #2
0
 def test_bad_protocol_with_ports(self):
     with self.assertRaises(AssertionError):
         _rule_to_iptables_fragment("foo", {"protocol": "10",
                                            "src_ports": [1]}, 4, {})
Пример #3
0
 def test_bad_icmp_type(self):
     with self.assertRaises(UnsupportedICMPType):
         _rule_to_iptables_fragment("foo", {"icmp_type": 255}, 4, {})
Пример #4
0
 def test_bad_icmp_type(self):
     with self.assertRaises(UnsupportedICMPType):
         _rule_to_iptables_fragment("foo", {"icmp_type": 255}, 4, {})