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.

Here's a StackOverflow question with a more thorough explanation. 
<https://stackoverflow.com/questions/63331259/when-testing-django-rest-framework-why-cant-i-get-apiclient-credentials-to-a>

Am I using API.credentials() incorrectly or missing something?

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-rest-framework+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-rest-framework/9cfe4e5a-5e64-40a8-a1c5-4094f1c36693n%40googlegroups.com.

Reply via email to