From 0e677e9dd178ae7a0250829729a666b54f4eac61 Mon Sep 17 00:00:00 2001 From: Xavier Ordoquy Date: Fri, 7 Mar 2014 16:11:51 +0100 Subject: Reintroduced url arguments in the urls for the tests. --- rest_framework/test.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rest_framework/test.py') 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) -- cgit v1.2.3