diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-04 07:45:13 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-08 12:02:37 +0100 |
| commit | e73ce08888e6f34d3f050377cfd2fbb733be94a9 (patch) | |
| tree | 4110a5603d1803a2b1b77859549cbd7a1a931205 /tests | |
| parent | 224c64a7338b9fa623fe24d49375a9f4afe02cf3 (diff) | |
[4.0.x] Refs #33476 -- Changed quotation marks in DebugViewTests.test_template_exceptions().
This prevents a failure after reformatting the code with Black.
Backport of f68fa8b45dfac545cfc4111d4e52804c86db68d3 from main
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/view_tests/templatetags/debugtags.py | 2 | ||||
| -rw-r--r-- | tests/view_tests/tests/test_debug.py | 3 |
2 files changed, 3 insertions, 2 deletions
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 8de82fbc63..fae0da6372 100644 --- a/tests/view_tests/tests/test_debug.py +++ b/tests/view_tests/tests/test_debug.py @@ -224,7 +224,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 ) |
