-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Description
Using test_plus APITestCase with django 5.2 raises the following error if I try to use self.client.force_authenticate:
AttributeError: 'Client' object has no attribute 'force_authenticate'
This seems to be because the new django 5.2 version seems to have changed how the client_class is read, see here.
As I understand, APITestCase should go from this:
class APITestCase(TestCase):
def __init__(self, *args, **kwargs):
self.client_class = get_api_client()
super(APITestCase, self).__init__(*args, **kwargs)
To this:
class APITestCase(TestCase):
client_class = get_api_client()
heckad
Metadata
Metadata
Assignees
Labels
No labels