Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#5888 closed (fixed)

Add head, options, put, delete to test Client

Reported by: Scott Barr <scott@…> Owned by: Leah Culver
Component: Testing framework Version: master
Severity: Keywords: Client
Cc: Gabriel, David Larlet, Jeff Balogh Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: UI/UX:

Description

To aid in unit testing RESTful interfaces I've added methods to the HTTP Client to support HEAD, OPTIONS, PUT and DELETE.

No tests.

Attachments (4)

test.client.patch (2.1 KB) - added by Scott Barr <scott@…> 9 years ago.
First cut. Addition of head, options, put and delete methods.
django.test.client.patch (4.0 KB) - added by Scott Barr <scott@…> 9 years ago.
Changed the patch so that the file path is relative to the django source directory.
django.test.client.2.patch (2.2 KB) - added by Scott Barr <scott@…> 9 years ago.
Last "fixed" patch was incorrect.
5888-r9050.diff (6.9 KB) - added by Leah Culver 8 years ago.
Added tests and docs to previous patch

Download all attachments as: .zip

Change History (17)

Changed 9 years ago by Scott Barr <scott@…>

Attachment: test.client.patch added

First cut. Addition of head, options, put and delete methods.

Changed 9 years ago by Scott Barr <scott@…>

Attachment: django.test.client.patch added

Changed the patch so that the file path is relative to the django source directory.

Changed 9 years ago by Scott Barr <scott@…>

Attachment: django.test.client.2.patch added

Last "fixed" patch was incorrect.

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

Needs tests: set

comment:2 Changed 9 years ago by Simon Greenhill <dev@…>

Triage Stage: UnreviewedDesign decision needed

comment:3 Changed 9 years ago by Gabriel

Cc: Gabriel added

i'd like to add my support for this. django test client could really use this for RESTful web service design -- an area we should be embracing.

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

Needs documentation: set
Triage Stage: Design decision neededAccepted

The idea and implementation is sound; however, this needs tests and documentation before it can go into trunk.

comment:5 Changed 8 years ago by antti@…

I needed DELETE and PUT too, implemented them before checking here myself, and actually my methods were quite similar.

Besides that, someone ought to get rid of the Content-Type header in GET requests, as GETs really do not have one...

comment:6 Changed 8 years ago by David Larlet

Cc: David Larlet added
Owner: changed from nobody to David Larlet

I'll try to complete the patch.

comment:7 Changed 8 years ago by Michael Radziej

milestone: post-1.0

comment:8 Changed 8 years ago by Leah Culver

Owner: changed from David Larlet to Leah Culver
Status: newassigned

Changed 8 years ago by Leah Culver

Attachment: 5888-r9050.diff added

Added tests and docs to previous patch

comment:9 Changed 8 years ago by Jeff Balogh

Cc: Jeff Balogh added

comment:10 Changed 8 years ago by Malcolm Tredinnick

Resolution: fixed
Status: assignedclosed

(In [9186]) Fixed #5888 -- Added methods to the test client to support HEAD, PUT, DELETE
and OPTIONS support. Thanks Scott Barr and Leah Culver.

comment:11 Changed 8 years ago by Malcolm Tredinnick

(In [9188]) Fixed #5888 -- Added methods to the test client to support HEAD, PUT, DELETE
and OPTIONS support. Thanks Scott Barr and Leah Culver.

comment:12 Changed 8 years ago by Malcolm Tredinnick

Because I'm a moron, r9186 was committed to the wrong branch, backed out in r9187 and committed to trunk in r9188. Nothing (else) to see here. Move along.

comment:13 Changed 8 years ago by (none)

milestone: post-1.0

Milestone post-1.0 deleted

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