New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QUERY_PARAMS empty when running tests, after Upgrading to 2.3.13 #1461
Comments
QUERY_PARAMS shouldn't be empty. Do you have a failing test case? |
There was a user on the ML with the same problem |
I didn't want to create a pull request as I wasn't entirely sure I hadn't missed something but I wrote a test for it here: here is the actual test |
Looking at the request factory in Django there is a slight discrepancy. The test passes and query params works if I change the code to this (all tests pass as well):
|
@jonashagstedt - Indeed - issue with this commit 1319da5 |
As this issue only affects the tests I've changed the title of this issue. Feel free to close it as it's probably not too important as test can be rewritten to use the data param. use:
instead of:
|
Nonononono. 'url?foo=bar' is perfectly valid usage - it's us that's done something wrong, not you. See https://docs.djangoproject.com/en/dev/topics/testing/tools/#django.test.Client.get - "If you already have the GET arguments in URL-encoded form, you can use that encoding instead of using the data argument. " |
@tomchristie that's for the client, but the Django's request factory doesn't support it any longer in 1.7 which is why this has been changed. |
I'm seeing this issue in tests after upgrading to 2.3.13 as well. |
If one of you can confirm that this is fixed with the PR #1463 I'll merge. |
Yes, confirmed fixed with that commit. Thanks! |
Thanks. It just got merged |
This is not a solution, im using a PUT request, and those cant have url param (indeed the param is json with list in it) |
After upgrading from 2.3.12 to 2.3.13 the QUERY_PARAMS are always empty.
Has the functionality changed around this? I saw nothing in the release notes.
NOTE This only affects testing
The text was updated successfully, but these errors were encountered: