summaryrefslogtreecommitdiff
path: root/tests/test_client
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-08 12:27:04 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-08 19:25:02 +0100
commit3278c31fa59b41d03aea167f4cf85f4ddf7f848d (patch)
tree0c80b4868391296335580242c8e65052a4f62a6b /tests/test_client
parent6a682b38e75d4c975b4c4493565a59f1bc14397c (diff)
[4.0.x] Refs #33476 -- Refactored code to strictly match 88 characters line length.
Backport of 7119f40c9881666b6f9b5cf7df09ee1d21cc8344 from main.
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 b1415e2557..d30352ef18 100644
--- a/tests/test_client/tests.py
+++ b/tests/test_client/tests.py
@@ -229,7 +229,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"
@@ -578,7 +579,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/")
@@ -775,7 +779,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/")