diff options
| author | Dan Prince <dan.prince@rackspace.com> | 2011-09-22 15:31:37 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-09-22 15:31:37 +0000 |
| commit | 4e85d7555c0b7844c22ed1bc6c8a24d9abe61dc4 (patch) | |
| tree | 4373ee2c4f9ae2290bb543875736ea7912505583 /nova/tests | |
| parent | d865a2a97c013a811c2c6baad00fa1eb95406c8d (diff) | |
| parent | 19b3b7a0c50dd6a68238daf8827519fd83a395cc (diff) | |
Update exception.wrap_exception so that all exceptions (not just Error and NovaException types) get logged correctly.
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/test_exception.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/nova/tests/test_exception.py b/nova/tests/test_exception.py index cd74f8871..d3bc1f6e8 100644 --- a/nova/tests/test_exception.py +++ b/nova/tests/test_exception.py @@ -74,14 +74,13 @@ class WrapExceptionTestCase(test.TestCase): 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)) + self.assertRaises(Exception, wrapped(bad_function_exception)) def test_wrap_exception_with_notifier(self): notifier = FakeNotifier() wrapped = exception.wrap_exception(notifier, "publisher", "event", "level") - self.assertRaises(exception.Error, wrapped(bad_function_exception)) + self.assertRaises(Exception, wrapped(bad_function_exception)) self.assertEquals(notifier.provided_publisher, "publisher") self.assertEquals(notifier.provided_event, "event") self.assertEquals(notifier.provided_priority, "level") @@ -91,7 +90,7 @@ class WrapExceptionTestCase(test.TestCase): def test_wrap_exception_with_notifier_defaults(self): notifier = FakeNotifier() wrapped = exception.wrap_exception(notifier) - self.assertRaises(exception.Error, wrapped(bad_function_exception)) + self.assertRaises(Exception, wrapped(bad_function_exception)) self.assertEquals(notifier.provided_publisher, None) self.assertEquals(notifier.provided_event, "bad_function_exception") self.assertEquals(notifier.provided_priority, notifier.ERROR) |
