Opened 18 years ago

Closed 18 years ago

#3160 closed enhancement (fixed)

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

Reported by: afternoon@… Owned by: Russell Keith-Magee
Component: Testing framework Version: dev
Severity: normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

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 (2)

test_client_raw_post.patch (941 bytes ) - added by afternoon@… 18 years ago.
[patch] Add raw_post method to django.test.client.Client
test_client_raw_post_v2.patch (4.6 KB ) - added by anonymous 18 years ago.
Revised version of raw_post patch, includes tests and docs

Download all attachments as: .zip

Change History (6)

by afternoon@…, 18 years ago

Attachment: test_client_raw_post.patch added

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

comment:1 by anonymous, 18 years ago

Needs documentation: set
Needs tests: set

comment:2 by anonymous, 18 years ago

Has patch: set

comment:3 by Chris Beaven, 18 years ago

Triage Stage: UnreviewedDesign decision needed

by anonymous, 18 years ago

Revised version of raw_post patch, includes tests and docs

comment:4 by Russell Keith-Magee, 18 years ago

Resolution: fixed
Status: newclosed

(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@…> for the patch.

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