Beispiel #1
0
 def test_is_valid_ip_invalid_ip(self):
     from EDL import is_valid_ip
     ip = 'This is not an IP, this is just a String'
     assert not is_valid_ip(ip)
Beispiel #2
0
 def test_is_valid_ip_ipv6(self):
     from EDL import is_valid_ip
     ip = '2001:0db8:85a3:0000:0000:8a2e:0370:7334'
     assert is_valid_ip(ip)
Beispiel #3
0
 def test_is_valid_ip_cidr(self):
     from EDL import is_valid_ip
     cidr = '1.2.3.5/10'
     assert not is_valid_ip(cidr)
Beispiel #4
0
 def test_is_valid_ip_ipv4(self):
     from EDL import is_valid_ip
     ip = '1.1.1.1'
     assert is_valid_ip(ip)