mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed #29576 -- Corrected the test client's HTTP_COOKIE header.
This commit is contained in:
parent
8d4ab0c41f
commit
71a739f3d7
2 changed files with 10 additions and 1 deletions
|
@ -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"')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue