in_network's consistency now verify that IP is not network or broadcast's IP + ip_netmask's consistency now verify that IP is not broadcast's IP

This commit is contained in:
2014-12-01 23:16:00 +01:00
parent a801951a78
commit 4fde28a15e
3 changed files with 16 additions and 10 deletions

View File

@ -198,6 +198,7 @@ def test_consistency_ip_netmask():
c.b = '255.255.255.255'
c.b = '255.255.255.0'
raises(ValueError, "c.a = '192.168.1.0'")
raises(ValueError, "c.a = '192.168.1.255'")
def test_consistency_network_netmask():
@ -225,6 +226,8 @@ def test_consistency_ip_in_network():
cfg.b = '255.255.255.0'
cfg.c = '192.168.1.1'
raises(ValueError, "cfg.c = '192.168.2.1'")
raises(ValueError, "cfg.c = '192.168.1.0'")
raises(ValueError, "cfg.c = '192.168.1.255'")
def test_consistency_ip_in_network_len_error():