Many sources describes how to set a token based authentication when testing requests as below but strangely credentials() is not defined anymore in APITestCase class?
self.client.credentials(HTTP_AUTHORIZATION='Bearer ' + JWT)
How come this method is missing from APITestCase? I m using the latest rest_framework
Many sources describes how to set a token based authentication when testing requests as below but strangely credentials() is not defined anymore in APITestCase class?
self.client.credentials(HTTP_AUTHORIZATION='Bearer ' + JWT)How come this method is missing from APITestCase? I m using the latest rest_framework