Opened 15 years ago
Closed 14 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)
Change History (7)
comment:1 by , 15 years ago
| milestone: | → 1.3 |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
| Triage Stage: | Unreviewed → Accepted |
by , 15 years ago
| Attachment: | ticket15596.diff added |
|---|
comment:2 by , 15 years ago
| Has patch: | set |
|---|
comment:3 by , 15 years ago
| Type: | → Bug |
|---|
comment:4 by , 15 years ago
| Severity: | → Normal |
|---|
comment:6 by , 14 years ago
| Easy pickings: | unset |
|---|---|
| Resolution: | → duplicate |
| Status: | assigned → 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.
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_dataor fix #12635 first (which is also done in the provided patch).