Hi,
I'm writing some tests using the Django test client for a REST API. This API uses the PUT method and I'm running into problems with the test client, as it appears to wish to URL encode the data into the query string.
Code is:
r = self.client.put('/json/api/endpoint', json.dumps(params), content_type='application/json')
and the error is "ValueError: need more than 1 value to unpack" from urlencode() in http.py
On Wed, Jan 13, 2010 at 9:55 AM, Malcolm Box <malco...@gmail.com> wrote:
I'm writing some tests using the Django test client for a REST API. This API uses the PUT method and I'm running into problems with the test client, as it appears to wish to URL encode the data into the query string.
Searching the tracker turns up:
http://code.djangoproject.com/ticket/11371
Does that sounds like the same problem to you? If so, it has been fixed in the 1.1.X branch and trunk. (The fix was made subsequent to the 1.1.1 release, so it is not in 1.1.1.)