I believe I am missing a fundamental setup.
I'm trying to test my API using Django's testing framework.
From the shell, I try:
from django.test import Client c = Client() r = c.get('/') I get a 400 Bad Request, which is not the expected output.
Using a simple curl from the command line:
curl http://localhost I get the expected output: {"detail":"Authentication credentials...
Am I missing something basic?
test.Clientwas returning an unexpected value,400 Bad Request. It should have been returning json from my API. I wasn't sure what I had wrong in my setup. It looks like I just had theDEBUGflag set incorrectly (see my answer below).