Code

Opened 7 years ago

Closed 7 years ago

#4360 closed (fixed)

Docs incorrectly say that response.content would contain a 302 URL

Reported by: simon-django@… Owned by: nobody
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

http://www.djangoproject.com/documentation/0.96/testing/#testing-responses

In the table under property 'content', it states that response.content will contain the URL when a 302 response is received. However, that's not the case. The URL is returned in responseLocation?.

Attachments (1)

testing.diff (822 bytes) - added by John Shaffer <jshaffer2112@…> 7 years ago.
tiny patch

Download all attachments as: .zip

Change History (5)

comment:1 Changed 7 years ago by John Shaffer <jshaffer2112@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Version changed from 0.96 to SVN

This is correct. With a 302 redirect, response.content contains nothing while response['Location'] contains the new URL.

Changed 7 years ago by John Shaffer <jshaffer2112@…>

tiny patch

comment:2 Changed 7 years ago by John Shaffer <jshaffer2112@…>

  • Has patch set

comment:3 Changed 7 years ago by Simon G. <dev@…>

  • Triage Stage changed from Accepted to Ready for checkin

comment:4 Changed 7 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

(In [6147]) Fixed #4360 -- Corrected where HTTP headers are in the test response. Also noted that it is an extension of HttpResponse, not a simpler object. Thanks, John Shaffer for the first part.

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.