add allow_reserved in IPOption

This commit is contained in:
2013-09-19 21:51:55 +02:00
parent 30c376e3ea
commit 28c416dd84
2 changed files with 14 additions and 4 deletions

View File

@ -29,6 +29,15 @@ def test_ip_default():
c.a == '88.88.88.88'
def test_ip_reserved():
a = IPOption('a', '')
b = IPOption('b', '', allow_reserved=True)
od = OptionDescription('od', '', [a, b])
c = Config(od)
raises(ValueError, "c.a = '226.94.1.1'")
c.b = '226.94.1.1'
def test_network():
a = NetworkOption('a', '')
od = OptionDescription('od', '', [a])