1
0
mirror of https://github.com/django/django.git synced 2025-07-06 18:59:13 +00:00

[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
This commit is contained in:
Mariusz Felisiak 2022-02-04 07:45:13 +01:00
parent 224c64a733
commit e73ce08888
2 changed files with 3 additions and 2 deletions

View File

@ -5,4 +5,4 @@ register = template.Library()
@register.simple_tag
def go_boom():
raise Exception('boom')
raise Exception("boom")

View File

@ -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
)