aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/test.py
diff options
context:
space:
mode:
authorXavier Ordoquy2014-03-07 20:20:19 +0100
committerXavier Ordoquy2014-03-07 20:20:19 +0100
commitc44591674fa2929aab8833fe76c4cf46e42c6625 (patch)
tree54678f5837685c73183f192011157ae9cea556e2 /rest_framework/test.py
parent6cf19fa4ef1942c84546322aedd371ba87c0ed5f (diff)
parent0e677e9dd178ae7a0250829729a666b54f4eac61 (diff)
downloaddjango-rest-framework-c44591674fa2929aab8833fe76c4cf46e42c6625.tar.bz2
Merge pull request #1463 from linovia/bugfix/old_request_factory_url_arguments
Reintroduced url arguments in the urls for the tests.
Diffstat (limited to 'rest_framework/test.py')
-rw-r--r--rest_framework/test.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/rest_framework/test.py b/rest_framework/test.py
index 75cb4d0b..df5a5b3b 100644
--- a/rest_framework/test.py
+++ b/rest_framework/test.py
@@ -76,6 +76,10 @@ class APIRequestFactory(DjangoRequestFactory):
r = {
'QUERY_STRING': urlencode(data or {}, doseq=True),
}
+ # Fix to support old behavior where you have the arguments in the url
+ # See #1461
+ if not data and '?' in path:
+ r['QUERY_STRING'] = path.split('?')[1]
r.update(extra)
return self.generic('GET', path, **r)