I'm running a test in Django with just two querys and in the timer it's taking 1 min and 10 seconds to finalize the test. Is there a setting I can adjust to speed up testing?
I'm currently using postgresql in the project database.
I'm running a test in Django with just two querys and in the timer it's taking 1 min and 10 seconds to finalize the test. Is there a setting I can adjust to speed up testing?
I'm currently using postgresql in the project database.
I was able to improve performance by changing the database to sqlite3 and directing the test to a specific app:
settings.py (at the end of the file):
import sys
if 'test' in sys.argv:
DATABASES['default'] = {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'test_db'
}
terminal:
$ ./manage.py test animals.tests
While running the test, the time dropped to 5 seconds .