Django

Code

Ticket #5888 (closed: fixed)

Opened 1 year ago

Last modified 2 months ago

Add head, options, put, delete to test Client

Reported by: Scott Barr <scott@divisionbyzero.com.au> Assigned to: leahculver
Milestone: post-1.0 Component: Testing framework
Version: SVN Keywords: Client
Cc: gabriel, david, jbalogh Triage Stage: Accepted
Has patch: 1 Needs documentation: 1
Needs tests: 1 Patch needs improvement: 0

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

test.client.patch (2.1 kB) - added by Scott Barr <scott@divisionbyzero.com.au> on 11/07/07 07:45:18.
First cut. Addition of head, options, put and delete methods.
django.test.client.patch (4.0 kB) - added by Scott Barr <scott@divisionbyzero.com.au> on 01/15/08 20:07:06.
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@divisionbyzero.com.au> on 01/16/08 00:33:41.
Last "fixed" patch was incorrect.
5888-r9050.diff (6.9 kB) - added by leahculver on 09/17/08 01:52:27.
Added tests and docs to previous patch

Change History

11/07/07 07:45:18 changed by Scott Barr <scott@divisionbyzero.com.au>

  • attachment test.client.patch added.

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

01/15/08 20:07:06 changed by Scott Barr <scott@divisionbyzero.com.au>

  • attachment django.test.client.patch added.

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

01/16/08 00:33:41 changed by Scott Barr <scott@divisionbyzero.com.au>

  • attachment django.test.client.2.patch added.

Last "fixed" patch was incorrect.

01/18/08 07:31:09 changed by russellm

  • needs_better_patch changed.
  • needs_tests set to 1.
  • needs_docs changed.

02/16/08 16:05:24 changed by Simon Greenhill <dev@simon.net.nz>

  • stage changed from Unreviewed to Design decision needed.

05/07/08 20:22:52 changed by gabriel

  • cc set to gabriel.

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.

06/06/08 09:53:14 changed by russellm

  • needs_docs set to 1.
  • 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.

06/18/08 04:09:49 changed by antti@redinnovation.com

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...

07/18/08 02:15:52 changed by david

  • cc changed from gabriel to gabriel, david.
  • owner changed from nobody to david.

I'll try to complete the patch.

07/22/08 12:07:23 changed by mir

  • milestone set to post-1.0.

09/16/08 13:30:55 changed by leahculver

  • owner changed from david to leahculver.
  • status changed from new to assigned.

09/17/08 01:52:27 changed by leahculver

  • attachment 5888-r9050.diff added.

Added tests and docs to previous patch

10/04/08 12:19:47 changed by jbalogh

  • cc changed from gabriel, david to gabriel, david, jbalogh.

10/07/08 03:47:05 changed by mtredinnick

  • status changed from assigned to closed.
  • resolution set to fixed.

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

10/07/08 04:23:46 changed 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.

10/07/08 04:28:50 changed 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.


Add/Change #5888 (Add head, options, put, delete to test Client)




Change Properties
Action