Opened 12 years ago
Closed 12 years ago
#18497 closed Bug (invalid)
Bug with TestCase handling JSON views
Reported by: | anonymous | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | 1.4 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
There is a bug with handling JSON objects in views for the test framework.
I posted details about it in a stackoverflow post (and this issue has been around for a while). http://stackoverflow.com/questions/11069357/django-test-client-squishes-nested-json
Note:
See TracTickets
for help on using tickets.
AFAICS, you wrongly assume that a Python dict equals a JSON structure. Use json.dumps() to convert a Python dict to a JSON structure.
By the way, the ticketing system is not meant as a support channel (TicketClosingReasons/UseSupportChannels)