mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #17371 -- Made the test client more flexible
The OPTIONS, PUT and DELETE methods no longer apply arbitrary data encoding (in the query string or in the request body).
This commit is contained in:
@@ -63,10 +63,10 @@ class ConditionalGet(TestCase):
|
||||
|
||||
def testIfMatch(self):
|
||||
self.client.defaults['HTTP_IF_MATCH'] = '"%s"' % ETAG
|
||||
response = self.client.put('/condition/etag/', {'data': ''})
|
||||
response = self.client.put('/condition/etag/')
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.client.defaults['HTTP_IF_MATCH'] = '"%s"' % EXPIRED_ETAG
|
||||
response = self.client.put('/condition/etag/', {'data': ''})
|
||||
response = self.client.put('/condition/etag/')
|
||||
self.assertEqual(response.status_code, 412)
|
||||
|
||||
def testBothHeaders(self):
|
||||
|
||||
Reference in New Issue
Block a user