Django

Code

Ticket #3160 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

Make raw post (e.g. XML) with django.test.client.Client more convinient

Reported by: afternoon@uk2.net Assigned to: russellm
Milestone: Component: Testing framework
Version: SVN Keywords:
Cc: Triage Stage: Design decision needed
Has patch: 1 Needs documentation: 1
Needs tests: 1 Patch needs improvement: 0

Description

As described in this mailing list thread adding a raw_post method to the test Client class would allow simple posting of raw data, such as XML or JSON, to views. This would make testing AJAX views and views that communicate with other agents than browsers easier.

Attachments

test_client_raw_post.patch (0.9 kB) - added by afternoon@uk2.net on 12/18/06 09:08:10.
[patch] Add raw_post method to django.test.client.Client
test_client_raw_post_v2.patch (4.6 kB) - added by anonymous on 01/21/07 08:30:07.
Revised version of raw_post patch, includes tests and docs

Change History

12/18/06 09:08:10 changed by afternoon@uk2.net

  • attachment test_client_raw_post.patch added.

[patch] Add raw_post method to django.test.client.Client

01/18/07 12:58:05 changed by anonymous

  • needs_docs set to 1.
  • needs_tests set to 1.

01/18/07 12:58:46 changed by anonymous

  • has_patch set to 1.

01/18/07 14:39:00 changed by SmileyChris

  • stage changed from Unreviewed to Design decision needed.

01/21/07 08:30:07 changed by anonymous

  • attachment test_client_raw_post_v2.patch added.

Revised version of raw_post patch, includes tests and docs

02/16/07 18:23:10 changed by russellm

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

(In [4529]) Fixed #3160 -- Added the ability to control the content type in a test client POST request. This is to allow easier testing of json-rpc/xml-rpc/soap etc interfaces. Thanks to Mikeal Rogers for the suggestion, and Ben <afternoon@uk2.net> for the patch.


Add/Change #3160 (Make raw post (e.g. XML) with django.test.client.Client more convinient)




Change Properties
Action