[Solved]-400 Bad Request While Using `django.test.client`

17👍

You can use the test client while DEBUG is False, you just need to add ‘testserver’ into your ALLOWED_HOSTS setting

1👍

It looks like:

DEBUG = True

is needed in the settings.py file for this to work.

Leave a comment