diff --git a/django/contrib/sessions/tests.py b/django/contrib/sessions/tests.py index 9e23b5131f..afcba2c27f 100644 --- a/django/contrib/sessions/tests.py +++ b/django/contrib/sessions/tests.py @@ -379,8 +379,9 @@ class SessionMiddlewareTests(unittest.TestCase): if 'httponly' in settings.SESSION_COOKIE_NAME: self.assertFalse( response.cookies[settings.SESSION_COOKIE_NAME]['httponly']) - self.assertNotIn('httponly', - str(response.cookies[settings.SESSION_COOKIE_NAME]['httponly'])) + + self.assertNotIn('httponly', + str(response.cookies[settings.SESSION_COOKIE_NAME])) class CookieSessionTests(SessionTestsMixin, TestCase):