def request(self, viewset_class, **kwargs): request = observer_request.Request( viewset_class, 'list', api_request.Request(factory.get('/', kwargs)) ) # Simulate serialization. return pickle.loads(pickle.dumps(request))
def create_request(viewset_class, **kwargs): request = observer_request.Request( viewset_class, 'list', api_request.Request(factory.get('/', kwargs)) ) return request