Code

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#5888 closed (fixed)

Add head, options, put, delete to test Client

Reported by: Scott Barr <scott@…> Owned by: leahculver
Component: Testing framework Version: master
Severity: Keywords: Client
Cc: gabriel, david, jbalogh 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@…> 6 years ago.
First cut. Addition of head, options, put and delete methods.
django.test.client.patch (4.0 KB) - added by Scott Barr <scott@…> 6 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@…> 6 years ago.
Last "fixed" patch was incorrect.
5888-r9050.diff (6.9 KB) - added by leahculver 6 years ago.
Added tests and docs to previous patch

Download all attachments as: .zip

Change History (17)

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

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

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

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

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

Last "fixed" patch was incorrect.

comment:1 Changed 6 years ago by russellm

  • Needs documentation unset
  • Needs tests set
  • Patch needs improvement unset

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

  • Triage Stage changed from Unreviewed to Design decision needed

comment:3 Changed 6 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 6 years ago by russellm

  • Needs documentation set
  • Triage Stage changed from Design decision needed to Accepted

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

comment:5 Changed 6 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 6 years ago by david

  • Cc david added
  • Owner changed from nobody to david

I'll try to complete the patch.

comment:7 Changed 6 years ago by mir

  • milestone set to post-1.0

comment:8 Changed 6 years ago by leahculver

  • Owner changed from david to leahculver
  • Status changed from new to assigned

Changed 6 years ago by leahculver

Added tests and docs to previous patch

comment:9 Changed 6 years ago by jbalogh

  • Cc jbalogh added

comment:10 Changed 6 years ago by mtredinnick

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

(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 6 years ago by mtredinnick

(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 6 years ago by mtredinnick

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

  • milestone post-1.0 deleted

Milestone post-1.0 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.