diff --git a/tests/view_tests/templatetags/debugtags.py b/tests/view_tests/templatetags/debugtags.py index d08b3c079e..7f0df767a3 100644 --- a/tests/view_tests/templatetags/debugtags.py +++ b/tests/view_tests/templatetags/debugtags.py @@ -5,4 +5,4 @@ register = template.Library() @register.simple_tag def go_boom(): - raise Exception('boom') + raise Exception("boom") diff --git a/tests/view_tests/tests/test_debug.py b/tests/view_tests/tests/test_debug.py index 8fc7ea2fcd..1484c071c5 100644 --- a/tests/view_tests/tests/test_debug.py +++ b/tests/view_tests/tests/test_debug.py @@ -258,7 +258,8 @@ class DebugViewTests(SimpleTestCase): except Exception: raising_loc = inspect.trace()[-1][-2][0].strip() self.assertNotEqual( - raising_loc.find("raise Exception('boom')"), -1, + raising_loc.find('raise Exception("boom")'), + -1, "Failed to find 'raise Exception' in last frame of " "traceback, instead found: %s" % raising_loc )