コード例 #1
0
def request_with_middleware(*, response, data):
    def get_response(request):
        del request
        return response

    m = middleware(get_response)
    return m(request=RequestFactory().get('/', data=data))
コード例 #2
0
def request_with_middleware(response, request):
    def get_response(request):
        del request
        return response

    m = middleware(get_response)
    return m(request=request)