summaryrefslogtreecommitdiff
path: root/tests/test_client
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/test_client
parent9c19aff7c7561e3a82978a272ecdaad40dda5c00 (diff)
downloaddjango-7119f40c9881666b6f9b5cf7df09ee1d21cc8344.tar.gz
Refs #33476 -- Refactored code to strictly match 88 characters line length.
Diffstat (limited to 'tests/test_client')
-rw-r--r--tests/test_client/tests.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/test_client/tests.py b/tests/test_client/tests.py
index ea096efda4..8fcf3e046d 100644
--- a/tests/test_client/tests.py
+++ b/tests/test_client/tests.py
@@ -238,7 +238,8 @@ class ClientTest(TestCase):
def test_raw_post(self):
"POST raw data (with a content type) to a view"
test_doc = """<?xml version="1.0" encoding="utf-8"?>
- <library><book><title>Blink</title><author>Malcolm Gladwell</author></book></library>
+ <library><book><title>Blink</title><author>Malcolm Gladwell</author></book>
+ </library>
"""
response = self.client.post(
"/raw_post_view/", test_doc, content_type="text/xml"
@@ -587,7 +588,10 @@ class ClientTest(TestCase):
self.assertEqual(response.context["user"].username, "testclient")
def test_view_with_login_and_custom_redirect(self):
- "Request a page that is protected with @login_required(redirect_field_name='redirect_to')"
+ """
+ Request a page that is protected with
+ @login_required(redirect_field_name='redirect_to')
+ """
# Get the page without logging in. Should result in 302.
response = self.client.get("/login_protected_view_custom_redirect/")
@@ -784,7 +788,10 @@ class ClientTest(TestCase):
# TODO: Log in with right permissions and request the page again
def test_view_with_permissions_exception(self):
- "Request a page that is protected with @permission_required but raises an exception"
+ """
+ Request a page that is protected with @permission_required but raises
+ an exception.
+ """
# Get the page without logging in. Should result in 403.
response = self.client.get("/permission_protected_view_exception/")