Opened 7 years ago

Closed 6 years ago

Last modified 5 years ago

#12412 closed (fixed)

testing docs could be more helpful regarding posting files

Reported by: KyleMac Owned by: Gabriel Hurley
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 Gabriel Hurley 7 years ago.
Adds notes about file handling to testing docs.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 7 years ago by Russell Keith-Magee

milestone: 1.2
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

Changed 7 years ago by Gabriel Hurley

Attachment: 12412_testing_docs.diff added

Adds notes about file handling to testing docs.

comment:2 Changed 7 years ago by Gabriel Hurley

Has patch: set
Owner: changed from nobody to Gabriel Hurley
Status: newassigned
Summary: Submitting files in tests docs are inaccuratetesting 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 6 years ago by Russell Keith-Magee

Triage Stage: AcceptedReady for checkin

comment:4 Changed 6 years ago by Russell Keith-Magee

Resolution: fixed
Status: assignedclosed

(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 6 years ago by Russell Keith-Magee

(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 5 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top