Call middleware with new style invocation.

Review Request #12027 — Created Feb. 3, 2022 and submitted — Latest diff uploaded

Information

Review Board
master

Reviewers

The old process_request method for middleware was deprecated with the
move to MIDDLEWARE from the old MIDDLEWARE_CLASSES. Our testcase
create_http_request method does a bunch of stuff to build a fake HTTP
request, including running the session and message middleware to
populate attributes on the request. This change moves that invocation
over to the new style (instantiate with a get_response method, and
then treat as a callable).

Ran unit tests.

Diff Revision 1

This is not the most recent revision of the diff. The latest diff is revision 2. See what's changed.

orig
1
2

Commits

First Last Summary ID Author
Call middleware with new style invocation.
The old `process_request` method for middleware was deprecated with the move to `MIDDLEWARE` from the old `MIDDLEWARE_CLASSES`. Our testcase `create_http_request` method does a bunch of stuff to build a fake HTTP request, including running the session and message middleware to populate attributes on the request. This change moves that invocation over to the new style (instantiate with a `get_response` method, and then treat as a callable). Testing Done: Ran unit tests.
0078970fdd4513e9a2a800e90b9ea9d54a032d1f David Trowbridge
reviewboard/accounts/tests/test_account_settings_form.py
reviewboard/accounts/tests/test_x509_auth_middleware.py
reviewboard/testing/testcase.py
Loading...