diff options
| author | django-bot <ops@djangoproject.com> | 2022-02-03 20:24:19 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-07 20:37:05 +0100 |
| commit | 9c19aff7c7561e3a82978a272ecdaad40dda5c00 (patch) | |
| tree | f0506b668a013d0063e5fba3dbf4863b466713ba /tests/template_tests/syntax_tests/test_debug.py | |
| parent | f68fa8b45dfac545cfc4111d4e52804c86db68d3 (diff) | |
Refs #33476 -- Reformatted code with Black.
Diffstat (limited to 'tests/template_tests/syntax_tests/test_debug.py')
| -rw-r--r-- | tests/template_tests/syntax_tests/test_debug.py | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/tests/template_tests/syntax_tests/test_debug.py b/tests/template_tests/syntax_tests/test_debug.py index 2f527b44ae..cbd71fa51a 100644 --- a/tests/template_tests/syntax_tests/test_debug.py +++ b/tests/template_tests/syntax_tests/test_debug.py @@ -6,41 +6,40 @@ from ..utils import setup @override_settings(DEBUG=True) class DebugTests(SimpleTestCase): - @override_settings(DEBUG=False) - @setup({'non_debug': '{% debug %}'}) + @setup({"non_debug": "{% debug %}"}) def test_non_debug(self): - output = self.engine.render_to_string('non_debug', {}) - self.assertEqual(output, '') + output = self.engine.render_to_string("non_debug", {}) + self.assertEqual(output, "") - @setup({'modules': '{% debug %}'}) + @setup({"modules": "{% debug %}"}) def test_modules(self): - output = self.engine.render_to_string('modules', {}) + output = self.engine.render_to_string("modules", {}) self.assertIn( - ''django': <module 'django' ', + "'django': <module 'django' ", output, ) - @setup({'plain': '{% debug %}'}) + @setup({"plain": "{% debug %}"}) def test_plain(self): - output = self.engine.render_to_string('plain', {'a': 1}) - self.assertTrue(output.startswith( - '{'a': 1}' - '{'False': False, 'None': None, ' - ''True': True}\n\n{' - )) + output = self.engine.render_to_string("plain", {"a": 1}) + self.assertTrue( + output.startswith( + "{'a': 1}" + "{'False': False, 'None': None, " + "'True': True}\n\n{" + ) + ) - @setup({'non_ascii': '{% debug %}'}) + @setup({"non_ascii": "{% debug %}"}) def test_non_ascii(self): group = Group(name="清風") - output = self.engine.render_to_string('non_ascii', {'group': group}) - self.assertTrue(output.startswith( - '{'group': <Group: 清風>}' - )) + output = self.engine.render_to_string("non_ascii", {"group": group}) + self.assertTrue(output.startswith("{'group': <Group: 清風>}")) - @setup({'script': '{% debug %}'}) + @setup({"script": "{% debug %}"}) def test_script(self): - output = self.engine.render_to_string('script', {'frag': '<script>'}) - self.assertTrue(output.startswith( - '{'frag': '<script>'}' - )) + output = self.engine.render_to_string("script", {"frag": "<script>"}) + self.assertTrue( + output.startswith("{'frag': '<script>'}") + ) |
