Opened 4 years ago
Closed 4 years ago
#32929 closed Bug (fixed)
AsyncRequestFactory.get() ignores data parameter
Description ¶
When passing data to AsyncRequestFactory.get(),
the resulting request.GET always gives an empty QueryDict
>>> request_factory = AsyncRequestFactory() >>> request = request_factory.get('/somewhere/', {'var': '100'}) >>> request.GET <QueryDict: {}>
while in synchronous
>>> request_factory = RequestFactory() >>> request = request_factory.get('/somewhere/', {'var': '100'}) >>> request.GET <QueryDict: {'var': ['100']}>
This also prevents AsyncClient.get() from passing GET parameters to view function.
Change History (5)
comment:1 by , 4 years ago
Version: | 3.2 → dev |
---|
follow-up: 3 comment:2 by , 4 years ago
Cc: | added |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 4 years ago
Has patch: | set |
---|
Replying to Mariusz Felisiak:
Would you like to prepare a patch? (tests are also required).
Yes, I have submitted a pull request.
comment:4 by , 4 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
Thanks for the report, good catch. I think the following should do the trick:
Would you like to prepare a patch? (tests are also required).