diff --git a/tests/regressiontests/views/tests/debug.py b/tests/regressiontests/views/tests/debug.py index 0b07b406d0..9457a2ee76 100644 --- a/tests/regressiontests/views/tests/debug.py +++ b/tests/regressiontests/views/tests/debug.py @@ -64,12 +64,12 @@ class ExceptionReporterTests(TestCase): "A simple exception report can be generated" try: request = self.rf.get('/test_view/') - raise KeyError("Can't find my keys") - except KeyError: + raise ValueError("Can't find my keys") + except ValueError: exc_type, exc_value, tb = sys.exc_info() reporter = ExceptionReporter(request, exc_type, exc_value, tb) html = reporter.get_traceback_html() - self.assertIn('

KeyError at /test_view/

', html) + self.assertIn('

ValueError at /test_view/

', html) self.assertIn('
Can't find my keys
', html) self.assertIn('Request Method:', html) self.assertIn('Request URL:', html) @@ -82,12 +82,12 @@ class ExceptionReporterTests(TestCase): def test_no_request(self): "An exception report can be generated without request" try: - raise KeyError("Can't find my keys") - except KeyError: + raise ValueError("Can't find my keys") + except ValueError: exc_type, exc_value, tb = sys.exc_info() reporter = ExceptionReporter(None, exc_type, exc_value, tb) html = reporter.get_traceback_html() - self.assertIn('

KeyError

', html) + self.assertIn('

ValueError

', html) self.assertIn('
Can't find my keys
', html) self.assertNotIn('Request Method:', html) self.assertNotIn('Request URL:', html)