summaryrefslogtreecommitdiff
path: root/tests/sessions_tests
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-04-07 22:04:45 -0400
committerTim Graham <timograham@gmail.com>2016-04-08 10:12:33 -0400
commit92053acbb9160862c3e743a99ed8ccff8d4f8fd6 (patch)
tree50e7fd28a650f0e2352cf94f92e5a66d28a81988 /tests/sessions_tests
parentdf8d8d4292684d6ffa7474f1e201aed486f02b53 (diff)
downloaddjango-92053acbb9160862c3e743a99ed8ccff8d4f8fd6.tar.gz
Fixed E128 flake8 warnings in tests/.
Diffstat (limited to 'tests/sessions_tests')
-rw-r--r--tests/sessions_tests/tests.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/sessions_tests/tests.py b/tests/sessions_tests/tests.py
index 6a8a7ee96b..5c4e133567 100644
--- a/tests/sessions_tests/tests.py
+++ b/tests/sessions_tests/tests.py
@@ -552,8 +552,10 @@ class FileSessionTests(SessionTestsMixin, unittest.TestCase):
file_prefix = settings.SESSION_COOKIE_NAME
def count_sessions():
- return len([session_file for session_file in os.listdir(storage_path)
- if session_file.startswith(file_prefix)])
+ return len([
+ session_file for session_file in os.listdir(storage_path)
+ if session_file.startswith(file_prefix)
+ ])
self.assertEqual(0, count_sessions())
@@ -651,8 +653,10 @@ class SessionMiddlewareTests(TestCase):
response = middleware.process_response(request, response)
self.assertTrue(
response.cookies[settings.SESSION_COOKIE_NAME]['httponly'])
- self.assertIn(http_cookies.Morsel._reserved['httponly'],
- str(response.cookies[settings.SESSION_COOKIE_NAME]))
+ self.assertIn(
+ http_cookies.Morsel._reserved['httponly'],
+ str(response.cookies[settings.SESSION_COOKIE_NAME])
+ )
@override_settings(SESSION_COOKIE_HTTPONLY=False)
def test_no_httponly_session_cookie(self):