1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #24153 -- Fixed cookie test compatibility with Python 3.4.3+

This commit is contained in:
Tim Graham
2015-01-19 15:12:57 -05:00
parent f6019312ba
commit b19b81b396
2 changed files with 5 additions and 3 deletions

View File

@@ -16,6 +16,7 @@ from django.test.utils import str_prefix
from django.utils import six
from django.utils.encoding import force_str
from django.utils.http import cookie_date, urlencode
from django.utils.six.moves import http_cookies
from django.utils.six.moves.urllib.parse import urlencode as original_urlencode
from django.utils.timezone import utc
@@ -221,7 +222,7 @@ class RequestsTests(SimpleTestCase):
example_cookie = response.cookies['example']
# A compat cookie may be in use -- check that it has worked
# both as an output string, and using the cookie attributes
self.assertIn('; httponly', str(example_cookie))
self.assertIn('; %s' % http_cookies.Morsel._reserved['httponly'], str(example_cookie))
self.assertTrue(example_cookie['httponly'])
def test_unicode_cookie(self):