From dc99baa33648820b93c90c15bd3562284e8ce4a9 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Wed, 30 Jan 2013 11:15:10 -0500 Subject: Add _FATAL_EXCEPTION_FORMAT_ERRORS global. Add a new global variable to control when exception format errors are fatal. Also, updates the Oslo test base class to enable fatal exception format errors. The motivation for this change is to give projects that use openstack common a hook to enable exception format checking when testing. Change-Id: Id8f4a0946b1614c8e987976b79069532a2e8608f --- tests/unit/test_exception.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/unit/test_exception.py') diff --git a/tests/unit/test_exception.py b/tests/unit/test_exception.py index c03a41d..6fe93ac 100644 --- a/tests/unit/test_exception.py +++ b/tests/unit/test_exception.py @@ -88,7 +88,8 @@ class OpenstackExceptionTest(utils.BaseTestCase): err = self.TestException(test=test_message) self.assertEqual(err._error_string, test_message) - def test_error_forating_error_string(self): + def test_error_formating_error_string(self): + self.stubs.Set(exception, '_FATAL_EXCEPTION_FORMAT_ERRORS', False) err = self.TestException(lol='U mad brah') self.assertEqual(err._error_string, self.TestException.message) -- cgit