示例#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)
示例#2
0
 def test_invalid_prefix_ipv4(self):
     is_valid = rules.is_valid_prefix('0.0.0.0/0')
     self.assertFalse(is_valid)
示例#3
0
 def test_valid_prefix_ipv6(self):
     is_valid = rules.is_valid_prefix('ffff::0/0')
     self.assertTrue(is_valid)
示例#4
0
 def test_valid_prefix_ipv4(self):
     is_valid = rules.is_valid_prefix('10.0.0.0/0')
     self.assertTrue(is_valid)