0

I want to test my website and I created a tests folder inside my app and created files for testing models…, I ran the test URLs and it was successful but I faced a problem with views, models, and forms tests, “database "test_postgres" already exists Type 'yes' if you would like to try deleting the test database 'test_postgres', or 'no' to cancel”, I’m afraid to delete something important so how can fix the problem ( I used Supabase hosted my Postgres database).

I tried to ran the views and models but I faced this problem what should I do to solve this problem

3
  • 1
    Does this answer your question? Django testing: Got an error creating the test database: database "database_name" already exists Commented Apr 18, 2024 at 9:31
  • Kindly share your test case function or class where the error is coming from, the views you want to test, and if possible, the models.py. Without the above requests I mentioned, we are likely not going to trace the error and help you out ASAP. Kindly wrap your code with this formatted markdown syntax ```py `` when you are done. Commented Apr 18, 2024 at 12:19
  • Please provide enough code so others can better understand or reproduce the problem. Commented Apr 19, 2024 at 7:47

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.