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/project_template | |
parent | f68fa8b45dfac545cfc4111d4e52804c86db68d3 (diff) | |
download | django-9c19aff7c7561e3a82978a272ecdaad40dda5c00.tar.gz |
Refs #33476 -- Reformatted code with Black.
Diffstat (limited to 'tests/project_template')
-rw-r--r-- | tests/project_template/test_settings.py | 33 | ||||
-rw-r--r-- | tests/project_template/urls.py | 2 |
2 files changed, 19 insertions, 16 deletions
diff --git a/tests/project_template/test_settings.py b/tests/project_template/test_settings.py index e526e10331..ba3dee7405 100644 --- a/tests/project_template/test_settings.py +++ b/tests/project_template/test_settings.py @@ -13,11 +13,11 @@ class TestStartProjectSettings(SimpleTestCase): self.addCleanup(self.temp_dir.cleanup) template_settings_py = os.path.join( os.path.dirname(conf.__file__), - 'project_template', - 'project_name', - 'settings.py-tpl', + "project_template", + "project_name", + "settings.py-tpl", ) - test_settings_py = os.path.join(self.temp_dir.name, 'test_settings.py') + test_settings_py = os.path.join(self.temp_dir.name, "test_settings.py") shutil.copyfile(template_settings_py, test_settings_py) def test_middleware_headers(self): @@ -31,15 +31,18 @@ class TestStartProjectSettings(SimpleTestCase): with self.settings( MIDDLEWARE=MIDDLEWARE, - ROOT_URLCONF='project_template.urls', + ROOT_URLCONF="project_template.urls", ): - response = self.client.get('/empty/') - headers = sorted(response.serialize_headers().split(b'\r\n')) - self.assertEqual(headers, [ - b'Content-Length: 0', - b'Content-Type: text/html; charset=utf-8', - b'Cross-Origin-Opener-Policy: same-origin', - b'Referrer-Policy: same-origin', - b'X-Content-Type-Options: nosniff', - b'X-Frame-Options: DENY', - ]) + response = self.client.get("/empty/") + headers = sorted(response.serialize_headers().split(b"\r\n")) + self.assertEqual( + headers, + [ + b"Content-Length: 0", + b"Content-Type: text/html; charset=utf-8", + b"Cross-Origin-Opener-Policy: same-origin", + b"Referrer-Policy: same-origin", + b"X-Content-Type-Options: nosniff", + b"X-Frame-Options: DENY", + ], + ) diff --git a/tests/project_template/urls.py b/tests/project_template/urls.py index 5a368ecef7..ae864b8e2d 100644 --- a/tests/project_template/urls.py +++ b/tests/project_template/urls.py @@ -3,5 +3,5 @@ from django.urls import path from . import views urlpatterns = [ - path('empty/', views.empty_view), + path("empty/", views.empty_view), ] |