[Django]-Django Testing – I only want one of my databases created – how to specify

7👍

✅

Well, here’s one way to do it. I added this to settings.py after setting up my normal databases.

if 'test' in sys.argv:
    DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3',}}

Leave a comment