Esempio n. 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))
Esempio n. 2
0
def request_with_middleware(response, request):
    def get_response(request):
        del request
        return response

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