Specify TEST_NAME in test settings to make concurrency tests work on sqlite.

Django 1.6 checks for this setting and defaults to None, which creates an in-memory database
when using sqlite. This causes our race condition test in wagtailimages to fail, since it's
not possible for multiple threads to share the same in-memory database.
This commit is contained in:
Matt Westcott 2014-12-03 10:34:43 +00:00 committed by Karl Hobley
parent e977ae5aec
commit a8eacc2f22

View file

@ -14,6 +14,7 @@ DATABASES = {
'default': {
'ENGINE': os.environ.get('DATABASE_ENGINE', 'django.db.backends.postgresql_psycopg2'),
'NAME': os.environ.get('DATABASE_NAME', 'wagtaildemo'),
'TEST_NAME': os.environ.get('DATABASE_NAME', 'wagtaildemo'),
'USER': os.environ.get('DATABASE_USER', 'postgres'),
'PASSWORD': os.environ.get('DATABASE_PASS', None),
}