summaryrefslogtreecommitdiff
path: root/tests/test_client
diff options
context:
space:
mode:
authorDražen Odobašić <dodobas@candela-it.com>2015-09-11 19:33:12 -0400
committerTim Graham <timograham@gmail.com>2015-09-12 11:40:50 -0400
commitb1e33ceceda1e75ff68c7deed8f6659683a195d3 (patch)
treee4e446f69194f2dc3c9c7ee3ecf48290ea8d4d31 /tests/test_client
parent84b0a8d2aad042fb573df5055b6153770d0929ac (diff)
Fixed #23395 -- Limited line lengths to 119 characters.
Diffstat (limited to 'tests/test_client')
-rw-r--r--tests/test_client/tests.py4
-rw-r--r--tests/test_client/views.py8
2 files changed, 9 insertions, 3 deletions
diff --git a/tests/test_client/tests.py b/tests/test_client/tests.py
index 042633ad54..1a6a453d04 100644
--- a/tests/test_client/tests.py
+++ b/tests/test_client/tests.py
@@ -156,7 +156,9 @@ 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>"""
+ test_doc = """<?xml version="1.0" encoding="utf-8"?>
+ <library><book><title>Blink</title><author>Malcolm Gladwell</author></book></library>
+ """
response = self.client.post("/raw_post_view/", test_doc,
content_type="text/xml")
self.assertEqual(response.status_code, 200)
diff --git a/tests/test_client/views.py b/tests/test_client/views.py
index 070e6305c2..a4cc5cd3a7 100644
--- a/tests/test_client/views.py
+++ b/tests/test_client/views.py
@@ -230,7 +230,9 @@ def login_protected_view_changed_redirect(request):
c = Context({'user': request.user})
return HttpResponse(t.render(c))
-login_protected_view_changed_redirect = login_required(redirect_field_name="redirect_to")(login_protected_view_changed_redirect)
+login_protected_view_changed_redirect = (
+ login_required(redirect_field_name="redirect_to")(login_protected_view_changed_redirect)
+)
def _permission_protected_view(request):
@@ -242,7 +244,9 @@ def _permission_protected_view(request):
c = Context({'user': request.user})
return HttpResponse(t.render(c))
permission_protected_view = permission_required('permission_not_granted')(_permission_protected_view)
-permission_protected_view_exception = permission_required('permission_not_granted', raise_exception=True)(_permission_protected_view)
+permission_protected_view_exception = (
+ permission_required('permission_not_granted', raise_exception=True)(_permission_protected_view)
+)
class _ViewManager(object):