def test_session_not_used(self, process_request): req = RequestFactory().get('/') NoVarySessionMiddleware().process_request(req) assert process_request.called
def test_session_not_used_api(self, process_request): req = RequestFactory().get('/') req.API = True NoVarySessionMiddleware().process_request(req) assert not process_request.called