diff options
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 |
