diff options
| author | Tom Christie | 2013-06-28 17:17:39 +0100 |
|---|---|---|
| committer | Tom Christie | 2013-06-28 17:17:39 +0100 |
| commit | 7224b20d58ceee22abc987980ab646ab8cb2d8dc (patch) | |
| tree | acbe0ee1eb19e22d561ca93e7fdab18f3a1e53ff /rest_framework/tests/test_routers.py | |
| parent | 4ee9cdc7aff30fc3f45e78292da77b5989bb0e23 (diff) | |
| download | django-rest-framework-7224b20d58ceee22abc987980ab646ab8cb2d8dc.tar.bz2 | |
Added APIRequestFactory
Diffstat (limited to 'rest_framework/tests/test_routers.py')
| -rw-r--r-- | rest_framework/tests/test_routers.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rest_framework/tests/test_routers.py b/rest_framework/tests/test_routers.py index d375f4a8..5fcccb74 100644 --- a/rest_framework/tests/test_routers.py +++ b/rest_framework/tests/test_routers.py @@ -1,15 +1,15 @@ from __future__ import unicode_literals from django.db import models from django.test import TestCase -from django.test.client import RequestFactory from django.core.exceptions import ImproperlyConfigured from rest_framework import serializers, viewsets, permissions from rest_framework.compat import include, patterns, url from rest_framework.decorators import link, action from rest_framework.response import Response from rest_framework.routers import SimpleRouter, DefaultRouter +from rest_framework.test import APIRequestFactory -factory = RequestFactory() +factory = APIRequestFactory() urlpatterns = patterns('',) @@ -193,6 +193,7 @@ class TestActionKeywordArgs(TestCase): {'permission_classes': [permissions.AllowAny]} ) + class TestActionAppliedToExistingRoute(TestCase): """ Ensure `@action` decorator raises an except when applied |
