Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_validate_ips():
validate_ips('127.0.0.1')
with pytest.raises(ValidationError):
validate_ips('256.0.0.0')
validate_ips('127.0.0.1,172.1.1.1')
with pytest.raises(ValidationError):
validate_ips('256.0.0.0,172.1.1.1')
def test_validate_ips():
validate_ips('127.0.0.1')
with pytest.raises(ValidationError):
validate_ips('256.0.0.0')
validate_ips('127.0.0.1,172.1.1.1')
with pytest.raises(ValidationError):
validate_ips('256.0.0.0,172.1.1.1')
def test_validate_ips_cidr():
validate_ips('10.0.0.0/8,172.1.1.1')
with pytest.raises(ValidationError):
validate_ips('10.10.10.10/8')
def test_validate_ips():
validate_ips('127.0.0.1')
with pytest.raises(ValidationError):
validate_ips('256.0.0.0')
validate_ips('127.0.0.1,172.1.1.1')
with pytest.raises(ValidationError):
validate_ips('256.0.0.0,172.1.1.1')
def test_validate_ips_cidr():
validate_ips('10.0.0.0/8,172.1.1.1')
with pytest.raises(ValidationError):
validate_ips('10.10.10.10/8')
def test_validate_ips():
validate_ips('127.0.0.1')
with pytest.raises(ValidationError):
validate_ips('256.0.0.0')
validate_ips('127.0.0.1,172.1.1.1')
with pytest.raises(ValidationError):
validate_ips('256.0.0.0,172.1.1.1')