Exemple #1
0
 def test_invalid_prefix_ipv6(self):
     is_valid = rules.is_valid_prefix('0000:0::0/0')
     self.assertFalse(is_valid)
     is_valid = rules.is_valid_prefix('::0/0')
     self.assertFalse(is_valid)
     is_valid = rules.is_valid_prefix('::/0')
     self.assertFalse(is_valid)
Exemple #2
0
 def test_invalid_prefix_ipv4(self):
     is_valid = rules.is_valid_prefix('0.0.0.0/0')
     self.assertFalse(is_valid)
Exemple #3
0
 def test_valid_prefix_ipv6(self):
     is_valid = rules.is_valid_prefix('ffff::0/0')
     self.assertTrue(is_valid)
Exemple #4
0
 def test_valid_prefix_ipv4(self):
     is_valid = rules.is_valid_prefix('10.0.0.0/0')
     self.assertTrue(is_valid)