Opened 8 years ago

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


I've got 2 tests.

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 8 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 8 years ago by Łukasz Rekucki

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

Changed 8 years ago by Łukasz Rekucki

Attachment: ticket15596.diff added

comment:2 Changed 8 years ago by Łukasz Rekucki

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 Changed 8 years ago by Luke Plant

Type: Bug

comment:4 Changed 8 years ago by Luke Plant

Severity: Normal

comment:5 Changed 7 years ago by Jacob

milestone: 1.3

Milestone 1.3 deleted

comment:6 Changed 7 years ago by Aymeric Augustin

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