Why Django throws an error creating test database?

When I try to run tests on my Django project, it throws the following error creating the test database:

django.db.utils.ProgrammingError: relation "users_websiteuser" does not exist

If I run the project, everything works fine. I've already tried running all the migrations (makemigrations and then migrate) and deleting the test database, but it still doesn't work. How can I fix this?

Back to Top