Speed up Django testing with sqlite

Posted on Nov. 29, 2010 in archive, django testing mysql sqlite, django.

Using MySql default ISAM storage type for testing in Django can be slow. To use sqlite in memory database with transactions support add this code to the end of settings.py:

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