ticket 3: Modify test_request_middleware