APIClient.credentials() not working as expected

16 views
Skip to first unread message

Derek DeHart

unread,
Aug 9, 2020, 8:12:10 PM8/9/20
to Django REST framework
I'm trying to write a functional test against my development server, using API.credentials() to authenticate with a token. The server responds to the request with a 401 status code, as opposed to 200 as I'd expect with authorization.

Rewriting the test using `request` with an added Authorization header works just fine.


Am I using API.credentials() incorrectly or missing something?
Reply all
Reply to author
Forward
0 new messages