Code

#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

Attachments (0)

Change History (1)

comment:1 Changed 22 months ago by claudep

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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)

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.