Code

Opened 4 years ago

Closed 4 years ago

#13786 closed (worksforme)

Test client PUT and DELETE do not include the GET query params

Reported by: coulix Owned by: nobody
Component: Testing framework Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Using DJango test client to test my piston API using Oauth two legged i realised that when passing ?xoauth_requestor_id=foo as a GET variable on PUT and DELETE action the request response did not include the variable in request.GET.
In the case of a PUT action request.GET and request.POST contanis the same POST data ... no trace of xoauth_requestor_id.

It works well on POST and GET

Attachments (0)

Change History (1)

comment:1 Changed 4 years ago by russellm

  • Resolution set to worksforme
  • Status changed from new to closed

As far as I can make out, the test client is working correctly here. The following two calls:

        response = self.client.put('/test/view/?key=value')
        response = self.client.put('/test/view/', data={'key':'value'})

both surface data in request GET; the same is also true for DELETE. This beahavior is also validated by the QueryStringTests regression tests inside test_client_regress.

Reopen if you can provide a specific test case that is failing.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.