• 
      

    Call middleware with new style invocation.

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

    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.

    Summary ID
    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.
    55d1a92fad07a75fb1d68dedd0fc93910a298fb9
    Description From Last Updated

    Even better, let's move this code to use self.create_http_request() instead. This code predates that function.

    chipx86chipx86
    chipx86
    1. 
        
    2. reviewboard/accounts/tests/test_account_settings_form.py (Diff revision 1)
       
       
       
       
       
       
       
       
       
       
      Show all issues

      Even better, let's move this code to use self.create_http_request() instead. This code predates that function.

    3. 
        
    david
    chipx86
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to django-3.2 (2fb504d)