aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/tests/test_urlpatterns.py
diff options
context:
space:
mode:
authorTom Christie2013-06-28 17:17:39 +0100
committerTom Christie2013-06-28 17:17:39 +0100
commit7224b20d58ceee22abc987980ab646ab8cb2d8dc (patch)
treeacbe0ee1eb19e22d561ca93e7fdab18f3a1e53ff /rest_framework/tests/test_urlpatterns.py
parent4ee9cdc7aff30fc3f45e78292da77b5989bb0e23 (diff)
downloaddjango-rest-framework-7224b20d58ceee22abc987980ab646ab8cb2d8dc.tar.bz2
Added APIRequestFactory
Diffstat (limited to 'rest_framework/tests/test_urlpatterns.py')
-rw-r--r--rest_framework/tests/test_urlpatterns.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/tests/test_urlpatterns.py b/rest_framework/tests/test_urlpatterns.py
index 29ed4a96..8132ec4c 100644
--- a/rest_framework/tests/test_urlpatterns.py
+++ b/rest_framework/tests/test_urlpatterns.py
@@ -2,7 +2,7 @@ from __future__ import unicode_literals
from collections import namedtuple
from django.core import urlresolvers
from django.test import TestCase
-from django.test.client import RequestFactory
+from rest_framework.test import APIRequestFactory
from rest_framework.compat import patterns, url, include
from rest_framework.urlpatterns import format_suffix_patterns
@@ -20,7 +20,7 @@ class FormatSuffixTests(TestCase):
Tests `format_suffix_patterns` against different URLPatterns to ensure the URLs still resolve properly, including any captured parameters.
"""
def _resolve_urlpatterns(self, urlpatterns, test_paths):
- factory = RequestFactory()
+ factory = APIRequestFactory()
try:
urlpatterns = format_suffix_patterns(urlpatterns)
except Exception: