Beispiel #1
0
 def test_it_should_not_recognise_a_non_ip_address_as_v4(self):
     self.assertFalse(IPv4Address.is_valid("not a v4 address"))
Beispiel #2
0
 def test_it_should_recognise_a_valid_ipv4_address(self):
     self.assertTrue(IPv4Address.is_valid("192.0.43.10"))
Beispiel #3
0
 def test_it_should_not_recognise_an_ipv6_address_as_v4(self):
     self.assertFalse(IPv4Address.is_valid("2001:0500:0088:0200:0000:0000:0000:0010"))