diff options
| author | Andrew Hankinson | 2012-12-30 13:57:43 -0400 | 
|---|---|---|
| committer | Andrew Hankinson | 2012-12-30 13:58:08 -0400 | 
| commit | df1880185c87733a82a41392898e67fe02c769aa (patch) | |
| tree | 1ccf4496cbe43d5727e0ac181b302dca6d28485c | |
| parent | b9e48e84138baeab3849cd80408569ed3d0308fc (diff) | |
| download | django-rest-framework-df1880185c87733a82a41392898e67fe02c769aa.tar.bz2 | |
Renaming DRFRequestFactory to RequestFactory
Updated tests to reflect the new name.
| -rw-r--r-- | rest_framework/tests/decorators.py | 5 | ||||
| -rw-r--r-- | rest_framework/tests/generics.py | 6 | ||||
| -rw-r--r-- | rest_framework/tests/utils.py | 4 | 
3 files changed, 7 insertions, 8 deletions
| diff --git a/rest_framework/tests/decorators.py b/rest_framework/tests/decorators.py index c2387f58..5e6bce4e 100644 --- a/rest_framework/tests/decorators.py +++ b/rest_framework/tests/decorators.py @@ -1,7 +1,6 @@  from django.test import TestCase  from rest_framework import status  from rest_framework.response import Response -# from django.test.client import RequestFactory  from rest_framework.renderers import JSONRenderer  from rest_framework.parsers import JSONParser  from rest_framework.authentication import BasicAuthentication @@ -17,13 +16,13 @@ from rest_framework.decorators import (      permission_classes,  ) -from rest_framework.tests.utils import DRFRequestFactory +from rest_framework.tests.utils import RequestFactory  class DecoratorTestCase(TestCase):      def setUp(self): -        self.factory = DRFRequestFactory() +        self.factory = RequestFactory()      def _finalize_response(self, request, response, *args, **kwargs):          response.request = request diff --git a/rest_framework/tests/generics.py b/rest_framework/tests/generics.py index a5432d11..33ac4b32 100644 --- a/rest_framework/tests/generics.py +++ b/rest_framework/tests/generics.py @@ -1,11 +1,11 @@  from django.test import TestCase  from django.utils import simplejson as json  from rest_framework import generics, serializers, status -from rest_framework.tests.utils import DRFRequestFactory +from rest_framework.tests.utils import RequestFactory  from rest_framework.tests.models import BasicModel, Comment, SlugBasedModel -factory = DRFRequestFactory() +factory = RequestFactory()  class RootView(generics.ListCreateAPIView): @@ -15,7 +15,7 @@ class RootView(generics.ListCreateAPIView):      model = BasicModel -class InstanceView(generics.RetrievePartialUpdateDestroyAPIView): +class InstanceView(generics.RetrieveUpdateDestroyAPIView):      """      Example description for OPTIONS.      """ diff --git a/rest_framework/tests/utils.py b/rest_framework/tests/utils.py index d7f14156..3906adb9 100644 --- a/rest_framework/tests/utils.py +++ b/rest_framework/tests/utils.py @@ -3,10 +3,10 @@ from django.test.client import MULTIPART_CONTENT  from urlparse import urlparse -class DRFRequestFactory(RequestFactory): +class RequestFactory(RequestFactory):      def __init__(self, **defaults): -        super(DRFRequestFactory, self).__init__(**defaults) +        super(RequestFactory, self).__init__(**defaults)      def patch(self, path, data={}, content_type=MULTIPART_CONTENT,              **extra): | 
