File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 3
3
# Note that we import as `DjangoRequestFactory` and `DjangoClient` in order
4
4
# to make it harder for the user to import the wrong thing without realizing.
5
5
from __future__ import unicode_literals
6
+ import django
6
7
from django .conf import settings
7
8
from django .test .client import Client as DjangoClient
8
9
from django .test .client import ClientHandler
@@ -140,10 +141,6 @@ def request(self, **kwargs):
140
141
return super (APIClient , self ).request (** kwargs )
141
142
142
143
143
- class APISimpleTestCase (testcases .SimpleTestCase ):
144
- client_class = APIClient
145
-
146
-
147
144
class APITransactionTestCase (testcases .TransactionTestCase ):
148
145
client_class = APIClient
149
146
@@ -152,5 +149,9 @@ class APITestCase(testcases.TestCase):
152
149
client_class = APIClient
153
150
154
151
155
- class APILiveServerTestCase (testcases .LiveServerTestCase ):
156
- client_class = APIClient
152
+ if django .VERSION >= (1 , 4 ):
153
+ class APISimpleTestCase (testcases .SimpleTestCase ):
154
+ client_class = APIClient
155
+
156
+ class APILiveServerTestCase (testcases .LiveServerTestCase ):
157
+ client_class = APIClient
You can’t perform that action at this time.
0 commit comments