SimpleTestCase.client_class
If you want to use a different Client
class (for example, a subclass with customized behavior), use the client_class
class attribute:
1 2 3 4 5 6 7 8 9 10 11 12 | from django.test import TestCase, Client class MyTestClient(Client): # Specialized methods for your environment ... class MyTest(TestCase): client_class = MyTestClient def test_my_stuff( self ): # Here self.client is an instance of MyTestClient... call_some_test_code() |
Please login to continue.