APITestCase doesn't have credentials() to set token based authorization #9045
Unanswered
cyapa
asked this question in
Question & Answer
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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
Beta Was this translation helpful? Give feedback.
All reactions