Opened 4 years ago

Closed 4 years ago

#15596 closed Bug (duplicate)

Client.put() override request.GET

Reported by: zlw Owned by: lrekucki
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 lrekucki 4 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 4 years ago by lrekucki

  • milestone set to 1.3
  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to lrekucki
  • Patch needs improvement unset
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted

Changed 4 years ago by lrekucki

comment:2 Changed 4 years ago by lrekucki

  • 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 4 years ago by lukeplant

  • Type set to Bug

comment:4 Changed 4 years ago by lukeplant

  • Severity set to Normal

comment:5 Changed 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

comment:6 Changed 4 years ago by aaugustin

  • Easy pickings unset
  • Resolution set to duplicate
  • Status changed from assigned to closed
  • 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