diff options
| author | Tom Christie | 2013-07-15 11:38:38 +0100 | 
|---|---|---|
| committer | Tom Christie | 2013-07-15 11:38:38 +0100 | 
| commit | ae63c49777f4d5b766b85a4b28f6328bd6f9516a (patch) | |
| tree | 2462b69085edba2995034939c5a1e7e40738e4ce /rest_framework/test.py | |
| parent | 6de9b7c8caaea00df2b1399ecd7b815ac556a70e (diff) | |
| download | django-rest-framework-ae63c49777f4d5b766b85a4b28f6328bd6f9516a.tar.bz2 | |
Added test case classes
Diffstat (limited to 'rest_framework/test.py')
| -rw-r--r-- | rest_framework/test.py | 17 | 
1 files changed, 17 insertions, 0 deletions
| diff --git a/rest_framework/test.py b/rest_framework/test.py index 29d017ee..ed436976 100644 --- a/rest_framework/test.py +++ b/rest_framework/test.py @@ -6,6 +6,7 @@ from __future__ import unicode_literals  from django.conf import settings  from django.test.client import Client as DjangoClient  from django.test.client import ClientHandler +from django.test import testcases  from rest_framework.settings import api_settings  from rest_framework.compat import RequestFactory as DjangoRequestFactory  from rest_framework.compat import force_bytes_or_smart_bytes, six @@ -137,3 +138,19 @@ class APIClient(APIRequestFactory, DjangoClient):          # Ensure that any credentials set get added to every request.          kwargs.update(self._credentials)          return super(APIClient, self).request(**kwargs) + + +class APISimpleTestCase(testcases.SimpleTestCase): +    client_class = APIClient + + +class APITransactionTestCase(testcases.TransactionTestCase): +    client_class = APIClient + + +class APITestCase(testcases.TestCase): +    client_class = APIClient + + +class APILiveServerTestCase(testcases.LiveServerTestCase): +    client_class = APIClient | 
