def test_alerts_invalid_ipv6(self): ip = Parameter('ip') ip.set('2001:db8::2:q1') validator = Ipv6Validator(ip) self.assertRaises(EnvironmentError, validator)
def test_alerts_invalid_ipv4(self): ip = Parameter('ip') ip.set('192.168.1-1') validator = Ipv4Validator(ip) self.assertRaises(EnvironmentError, validator)
def test_validates_ipv6(self): ip = Parameter('ip') ip.set('2001:db8::2:1') validator = Ipv6Validator(ip) validator()
def test_validates_ipv4(self): ip = Parameter('ip') ip.set('192.168.1.1') validator = Ipv4Validator(ip) validator()