Opened 17 years ago
Closed 17 years ago
#4955 closed (wontfix)
Feature: Allow unit tests to access test client's previous request object
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Testing framework | Version: | dev |
Severity: | Keywords: | Client test | |
Cc: | Triage Stage: | Design decision needed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I've added 'previous_request' variable to django.test.client.Client. It holds the last WSGIRequest created by ClientHandler.
This is useful because it allows me to test certain middleware which alters the request.
I'm including patches for:
django.test.client.Client
tests.regressiontests.test_client_regress.models
docs/testing.txt
Attachments (3)
Change History (6)
by , 17 years ago
Attachment: | test_client_py.patch added |
---|
by , 17 years ago
Attachment: | test_client_regress_models_py.patch added |
---|
tests.regressiontests.test_client_regress.models
comment:2 by , 17 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:3 by , 17 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I'm marking this a wontfix, because I'm don't understand the use case, and the test you provided doesn't shed any light on the issue. If you can clarify your use case, feel free to reopen the ticket.
As a housekeeping issue - this should be submitted as a single patch rooted at the base of the Django tree.
django.test.client