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:
Aymeric Augustin 2012-05-25 19:03:15 +02:00
parent 323b414441
commit e73838b6dd
5 changed files with 93 additions and 81 deletions

View file

@ -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):