testing - Django test client post data is empty -


i have application have create simple post request using django test client.

userfrom = client() userfrom.login(username="admin1",password=test_password) data = {"some":"data"} responsenew = userfrom.post("/foo/too/",simplejson.dumps(data),content_type="application/json") 

when check post request @ view of "/foo/too/" post dictionary empty.

i have checked following question. not work. using django 1.5.

post dictionary empty

you can try like:

responsenew = userfrom.post("/foo/too/", data) 

Comments

Popular posts from this blog

c - Calling a function within a loop -

vb.net - Unbound DataGridView add row with checkbox error -

How i fill combobox items in Radgridview manually using in vb.net -