Re: django.test.client: Improper POST requests

2013-08-29 Thread Ɓukasz Rekucki
Hi abh, On 29 August 2013 23:11, abh2134 wrote: > Hi all, > > Working with django.test.client. > > Running: > response = self.client.post(url, {"message": "this is a message"}), > content_type="application/json") > > The server receives: > (Pdb) request.body > "{'platform': 'ios', 'token': '123ab

django.test.client: Improper POST requests

2013-08-29 Thread abh2134
Hi all, Working with django.test.client. *Running*: response = self.client.post(url, {"message": "this is a message"}), content_type="application/json") *The server receives*: (Pdb) request.body "{'platform': 'ios', 'token': '123abc', 'uuid': 'abc123'}" ... which is NOT a valid JSON string. A