diff options
| author | Xavier Ordoquy | 2014-01-28 18:53:58 +0100 | 
|---|---|---|
| committer | Xavier Ordoquy | 2014-01-28 18:53:58 +0100 | 
| commit | da89cfc9373c03115b1bc2f62a7f974363c6c050 (patch) | |
| tree | 32aab88db4411acd48c8105ad0ca9028ce1b4613 /rest_framework/test.py | |
| parent | 6aadd1639b11091fa1987b1608fd4f797f09bc2b (diff) | |
| download | django-rest-framework-da89cfc9373c03115b1bc2f62a7f974363c6c050.tar.bz2 | |
Don’t rely on Django’s get as it breaks for 1.7
Diffstat (limited to 'rest_framework/test.py')
| -rw-r--r-- | rest_framework/test.py | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/rest_framework/test.py b/rest_framework/test.py index 234d10a4..23a31ee4 100644 --- a/rest_framework/test.py +++ b/rest_framework/test.py @@ -71,6 +71,10 @@ class APIRequestFactory(DjangoRequestFactory):          return ret, content_type +    def get(self, path, data=None, format=None, content_type=None, **extra): +        data, content_type = self._encode_data(data, format, content_type) +        return self.generic('GET', path, data, content_type, **extra) +      def post(self, path, data=None, format=None, content_type=None, **extra):          data, content_type = self._encode_data(data, format, content_type)          return self.generic('POST', path, data, content_type, **extra) | 
