summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorKen Pepple <ken.pepple@gmail.com>2011-08-21 17:52:14 -0700
committerKen Pepple <ken.pepple@gmail.com>2011-08-21 17:52:14 -0700
commit0fdbea56baaef08575b98e8a553ceac9876e4962 (patch)
tree3621d209ac688bf5b30554e5262711092a9a0290 /nova/tests
parentbad921b5efa7b11a91d1df32b3d17fdb95852589 (diff)
added exception catch and test for bad prefix
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 891d52358..6e72b7330 100644
--- a/nova/tests/test_ipv6.py
+++ b/nova/tests/test_ipv6.py
@@ -45,6 +45,13 @@ class IPv6RFC2462TestCase(test.TestCase):
self.assertRaises(TypeError, ipv6.to_global,
'2001:db8::', bad_mac, 'test')
+ def test_to_global_with_bad_prefix(self):
+ bad_prefix = '82'
+ self.assertRaises(TypeError, ipv6.to_global,
+ bad_prefix,
+ '2001:db8::216:3eff:fe33:4455',
+ 'test')
+
class IPv6AccountIdentiferTestCase(test.TestCase):
"""Unit tests for IPv6 account_identifier backend operations."""