Esempio n. 1
0
 def test_bad_protocol_with_ports(self):
     with self.assertRaises(AssertionError):
         _rule_to_iptables_fragment("foo", {"protocol": "10",
                                            "src_ports": [1]}, 4, {})
Esempio n. 2
0
 def test_bad_protocol_with_ports(self):
     with self.assertRaises(AssertionError):
         _rule_to_iptables_fragment("foo", {"protocol": "10",
                                            "src_ports": [1]}, 4, {})
Esempio n. 3
0
 def test_bad_icmp_type(self):
     with self.assertRaises(UnsupportedICMPType):
         _rule_to_iptables_fragment("foo", {"icmp_type": 255}, 4, {})
Esempio n. 4
0
 def test_bad_icmp_type(self):
     with self.assertRaises(UnsupportedICMPType):
         _rule_to_iptables_fragment("foo", {"icmp_type": 255}, 4, {})