Opened 14 years ago

Closed 13 years ago

#15596 closed Bug (duplicate)

Client.put() override request.GET

Reported by: zlw Owned by: Łukasz Rekucki
Component: Testing framework Version: 1.2
Severity: Normal Keywords: request, client, put, get
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I've got 2 tests. http://pastie.org/1665086

In terminal, with cURL, everything works fine, but when I'm running those test, they fails.
Both of them returns same value "OK : Task with ID {some id} was updated."

It looks like, Client.put() override(?) request.GET

Attachments (1)

ticket15596.diff (10.6 KB ) - added by Łukasz Rekucki 14 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by Łukasz Rekucki, 14 years ago

milestone: 1.3
Owner: changed from nobody to Łukasz Rekucki
Status: newassigned
Triage Stage: UnreviewedAccepted

by Łukasz Rekucki, 14 years ago

Attachment: ticket15596.diff added

comment:2 by Łukasz Rekucki, 14 years ago

Has patch: set

The attached patch makes request construction in RequestFactory more DRY. Current tests explicitly test for .put() as a get-like method which is at least weird, so I altered them to make it a post-like method.

Unfortunately, #12635 comes up - Django doesn't populate request.POST on PUT requests. We can either special case PUT here and check directly on raw_post_data or fix #12635 first (which is also done in the provided patch).

comment:3 by Luke Plant, 14 years ago

Type: Bug

comment:4 by Luke Plant, 14 years ago

Severity: Normal

comment:5 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

comment:6 by Aymeric Augustin, 13 years ago

Easy pickings: unset
Resolution: duplicate
Status: assignedclosed
UI/UX: unset

The patch no longer applies, and since #12635 was closed as wontfix, it needs changes.

Making .put() behave like .post() as well as making RequestFactory more DRY are covered by the patch I recently attached to #17371.

I'm going to close this ticket in favor of #17371 which has a more recent patch, but feel free to reopen it if I've missed something.

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