summaryrefslogtreecommitdiff
path: root/tests/requests/tests.py
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-04 08:08:27 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-07 20:37:05 +0100
commit7119f40c9881666b6f9b5cf7df09ee1d21cc8344 (patch)
treefa50869f5614295f462d9bf77fec59365c621609 /tests/requests/tests.py
parent9c19aff7c7561e3a82978a272ecdaad40dda5c00 (diff)
Refs #33476 -- Refactored code to strictly match 88 characters line length.
Diffstat (limited to 'tests/requests/tests.py')
-rw-r--r--tests/requests/tests.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/requests/tests.py b/tests/requests/tests.py
index 6be47efc8b..6d2d7d777a 100644
--- a/tests/requests/tests.py
+++ b/tests/requests/tests.py
@@ -421,7 +421,8 @@ class RequestsTests(SimpleTestCase):
def test_POST_multipart_with_content_length_zero(self):
"""
- Multipart POST requests with Content-Length >= 0 are valid and need to be handled.
+ Multipart POST requests with Content-Length >= 0 are valid and need to
+ be handled.
"""
# According to:
# https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
@@ -591,7 +592,10 @@ class RequestsTests(SimpleTestCase):
"wsgi.input": FakePayload(),
}
)
- msg = "Invalid non-ASCII Content-Type in multipart: multipart/form-data; boundary = à"
+ msg = (
+ "Invalid non-ASCII Content-Type in multipart: multipart/form-data; "
+ "boundary = à"
+ )
with self.assertRaisesMessage(MultiPartParserError, msg):
request.POST
@@ -874,7 +878,10 @@ class HostValidationTests(SimpleTestCase):
@override_settings(ALLOWED_HOSTS=[])
def test_get_host_suggestion_of_allowed_host(self):
- """get_host() makes helpful suggestions if a valid-looking host is not in ALLOWED_HOSTS."""
+ """
+ get_host() makes helpful suggestions if a valid-looking host is not in
+ ALLOWED_HOSTS.
+ """
msg_invalid_host = "Invalid HTTP_HOST header: %r."
msg_suggestion = msg_invalid_host + " You may need to add %r to ALLOWED_HOSTS."
msg_suggestion2 = (