[tests] speedup the tests a bit by using a in memory database
parent
4cae52ee94
commit
76a8b603f5
|
|
@ -76,11 +76,15 @@ WSGI_APPLICATION = 'testapp.wsgi.application'
|
|||
# Database
|
||||
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
|
||||
|
||||
if 'test' in sys.argv:
|
||||
DB_NAME = ':memory:'
|
||||
else:
|
||||
DB_NAME = os.path.join(BASE_DIR, 'db.sqlite3')
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
# 'NAME': ':memory:',
|
||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
||||
'NAME': DB_NAME,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue