浏览代码

Refs #33476 -- Changed quotation marks in DebugViewTests.test_template_exceptions().

This prevents a failure after reformatting the code with Black.
Mariusz Felisiak 3 年之前
父节点
当前提交
f68fa8b45d
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 1 1
      tests/view_tests/templatetags/debugtags.py
  2. 2 1
      tests/view_tests/tests/test_debug.py

+ 1 - 1
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")

+ 2 - 1
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
                 )