It is right. Currently, APIRequestFactory returns an HttpRequest object that only updates to the REST framework Request object when it reaches the presentation level.
This reflects the behavior that you see in a real request, and what it does is, for example, a matter. rendering JSON, XML, or any other type of content that you customized for your test requests.
However, I agree that this is an amazing behavior, and at some point it will probably return a Request object, and presenting the REST structure will ensure that it will perform a Request update on requests for HttpRequest instances.
What you need to do in your case is actually to call the view, and not invoke the .get() method ...
factory = APIRequestFactory() request = factory.get('/?uuid=abcd') view = DummyView.as_view() response = view(request)
source share