Opened 12 years ago
Closed 12 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 , 12 years ago
| Has patch: | set |
|---|
comment:2 by , 12 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
I’ve created a pull request: https://github.com/django/django/pull/1438