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: snhorne@… 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)

test_client_py.patch (876 bytes ) - added by snhorne@… 17 years ago.
django.test.client
test_client_regress_models_py.patch (1007 bytes ) - added by snhorne@… 17 years ago.
tests.regressiontests.test_client_regress.models
testing_txt.patch (1.9 KB ) - added by starr horne <snhorne@…> 17 years ago.
/docs/testing.txt

Download all attachments as: .zip

Change History (6)

by snhorne@…, 17 years ago

Attachment: test_client_py.patch added

django.test.client

by snhorne@…, 17 years ago

tests.regressiontests.test_client_regress.models

by starr horne <snhorne@…>, 17 years ago

Attachment: testing_txt.patch added

/docs/testing.txt

comment:1 by starr horne <snhorne@…>, 17 years ago

Oh. I forgot. All tests pass on my machine.

comment:2 by John Shaffer <jshaffer2112@…>, 17 years ago

Triage Stage: UnreviewedDesign decision needed

comment:3 by Russell Keith-Magee, 17 years ago

Resolution: wontfix
Status: newclosed

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.

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