summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorKen Pepple <ken.pepple@gmail.com>2011-08-21 17:55:54 -0700
committerKen Pepple <ken.pepple@gmail.com>2011-08-21 17:55:54 -0700
commit326cfda8cc50f5db083e9df381d3109e0302605d (patch)
treefd1bc9cf2930f1884d77ba8a1c0c69d8088d381e /nova/tests
parent43e2ca531f0fdea5173b7f237627fc3543caf13b (diff)
added exception catch for bad prefix and matching test
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/test_ipv6.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/nova/tests/test_ipv6.py b/nova/tests/test_ipv6.py
index 6afc7e3f9..f9c2517a7 100644
--- a/nova/tests/test_ipv6.py
+++ b/nova/tests/test_ipv6.py
@@ -60,3 +60,10 @@ class IPv6AccountIdentiferTestCase(test.TestCase):
bad_mac = '02:16:3e:33:44:5X'
self.assertRaises(TypeError, ipv6.to_global,
'2001:db8::', bad_mac, 'test')
+
+ def test_to_global_with_bad_prefix(self):
+ bad_prefix = '78'
+ self.assertRaises(TypeError, ipv6.to_global,
+ bad_prefix,
+ '2001:db8::a94a:8fe5:ff33:4455',
+ 'test')