summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorSandy Walsh <sandy.walsh@rackspace.com>2011-07-01 07:31:17 -0700
committerSandy Walsh <sandy.walsh@rackspace.com>2011-07-01 07:31:17 -0700
commite789dd29c48ee8ad2b10eeb9ff24725f0e696bed (patch)
treeb2afd77ae9ae7a1245a41e73be3348e5e0e2e2a9 /nova/tests
parentfbe296a7ab3bf1b9ee2bf765d13b5675ff4d6295 (diff)
review fixes
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/test_exception.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/nova/tests/test_exception.py b/nova/tests/test_exception.py
index 16e273f89..692b714e5 100644
--- a/nova/tests/test_exception.py
+++ b/nova/tests/test_exception.py
@@ -64,11 +64,16 @@ def bad_function_exception():
class WrapExceptionTestCase(test.TestCase):
- def test_wrap_exception(self):
+ def test_wrap_exception_good_return(self):
wrapped = exception.wrap_exception()
self.assertEquals(99, wrapped(good_function)())
+
+ def test_wrap_exception_throws_error(self):
+ wrapped = exception.wrap_exception()
self.assertRaises(exception.Error, wrapped(bad_function_error))
+ def test_wrap_exception_throws_exception(self):
+ wrapped = exception.wrap_exception()
# Note that Exception is converted to Error ...
self.assertRaises(exception.Error, wrapped(bad_function_exception))