mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #29576 -- Corrected the test client's HTTP_COOKIE header.
This commit is contained in:
committed by
Tim Graham
parent
8d4ab0c41f
commit
71a739f3d7
@@ -1423,3 +1423,9 @@ class RequestFactoryEnvironmentTests(SimpleTestCase):
|
||||
self.assertEqual(request.META.get('SERVER_PORT'), '80')
|
||||
self.assertEqual(request.META.get('SERVER_PROTOCOL'), 'HTTP/1.1')
|
||||
self.assertEqual(request.META.get('SCRIPT_NAME') + request.META.get('PATH_INFO'), '/path/')
|
||||
|
||||
def test_cookies(self):
|
||||
factory = RequestFactory()
|
||||
factory.cookies.load('A="B"; C="D"; Path=/; Version=1')
|
||||
request = factory.get('/')
|
||||
self.assertEqual(request.META['HTTP_COOKIE'], 'A="B"; C="D"')
|
||||
|
||||
Reference in New Issue
Block a user