Exemplo n.º 1
0
 def test_on_valid_ipv4_address_bytes(self):
     self.assertTrue(is_valid_ipv4_address(b"\xC0\xA8\x00\x01"))
Exemplo n.º 2
0
 def test_on_invalid_ipv4_address_bytes(self):
     self.assertFalse(is_valid_ipv4_address(b"\xC0\xA8\x00"))
Exemplo n.º 3
0
 def test_on_invalid_ipv4_address_numbers(self):
     self.assertFalse(is_valid_ipv4_address(8000000000))
Exemplo n.º 4
0
 def test_on_valid_ipv4_address_numbers(self):
     self.assertTrue(is_valid_ipv4_address(3232235521))
Exemplo n.º 5
0
 def test_on_invalid_ipv4_address_string(self):
     self.assertFalse(is_valid_ipv4_address("500.168.0.1"))
Exemplo n.º 6
0
 def test_on_valid_ipv4_address_string(self):
     self.assertTrue(is_valid_ipv4_address("192.168.0.1"))
Exemplo n.º 7
0
 def test_on_valid_ipv6_address_string(self):
     self.assertFalse(is_valid_ipv4_address("2001:db8::1000"))