Code

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#12412 closed (fixed)

testing docs could be more helpful regarding posting files

Reported by: KyleMac Owned by: gabrielhurley
Component: Documentation Version: 1.1
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://docs.djangoproject.com/en/dev/topics/testing/#django.test.client.Client.post

1) Doesn't show that image files for ImageFields need to be opened in binary mode.

2) Doesn't mention that you can't reuse the same handle for multiple fields or tests without manually resetting the pointer.

Attachments (1)

12412_testing_docs.diff (1.1 KB) - added by gabrielhurley 4 years ago.
Adds notes about file handling to testing docs.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 4 years ago by russellm

  • milestone set to 1.2
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Changed 4 years ago by gabrielhurley

Adds notes about file handling to testing docs.

comment:2 Changed 4 years ago by gabrielhurley

  • Has patch set
  • Owner changed from nobody to gabrielhurley
  • Status changed from new to assigned
  • Summary changed from Submitting files in tests docs are inaccurate to testing docs could be more helpful regarding posting files

It's not really that the docs are inaccurate. Those are fairly universal notes about file handling in Python. However, there's no reason Django's docs can't be extra-helpful and remind people of these things. Patch attached.

comment:3 Changed 4 years ago by russellm

  • Triage Stage changed from Accepted to Ready for checkin

comment:4 Changed 4 years ago by russellm

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

(In [13166]) Fixed #12412 -- Clarified the documentation around file handling by the test client. Thanks to Gabriel Hurley for the draft patch.

comment:5 Changed 4 years ago by russellm

(In [13172]) [1.1.X] Fixed #12412 -- Clarified the documentation around file handling by the test client. Thanks to Gabriel Hurley for the draft patch.

Backport of r13166 from trunk.

comment:6 Changed 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

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.