Opened 11 years ago

Closed 11 years ago

#20864 closed Cleanup/optimization (fixed)

Test client should use common method when making requests

Reported by: Krzysztof Jurewicz Owned by: Krzysztof Jurewicz
Component: Testing framework Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Test client has a generic method, which is used to construct PUT, OPTIONS and PATCH requests. However it could be used also in GET, HEAD and POST methods, which would allow easier creation of custom test clients. For example, if one wants to create a client which adds a specific HTTP header to all requests, no matter what the method, he could do this by overriding only generic method. Now he has to override generic, post, head and get.

Change History (2)

comment:1 by Krzysztof Jurewicz, 11 years ago

Has patch: set

I’ve created a pull request: https://github.com/django/django/pull/1438

comment:2 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: newclosed

In 4eeb8ec147022d3a7360d9fa78d3cd1c76accfb1:

Fixed #20864 -- Made the test client use common method for performing requests.

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