diff options
| author | Tom Christie | 2013-07-04 05:50:04 -0700 |
|---|---|---|
| committer | Tom Christie | 2013-07-04 05:50:04 -0700 |
| commit | 99794773cf6b865b5b860b35db31dea92968c605 (patch) | |
| tree | 157b09d6b19ee5583d6d32123b3671c1c75adbc9 /rest_framework/tests/test_routers.py | |
| parent | a890116ab31e57af3bd1382c1f17259fa368f988 (diff) | |
| parent | 7398464b397d37dbcfda13eb6142039fed3e9a19 (diff) | |
| download | django-rest-framework-99794773cf6b865b5b860b35db31dea92968c605.tar.bz2 | |
Merge pull request #962 from tomchristie/test-client
APIClient and 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 |
