mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Only use SQLite config during tests if it exists
This commit is contained in:
@@ -4,7 +4,8 @@ import tempfile
|
|||||||
|
|
||||||
tmpdir = tempfile.TemporaryDirectory()
|
tmpdir = tempfile.TemporaryDirectory()
|
||||||
os.environ.setdefault('DATA_DIR', tmpdir.name)
|
os.environ.setdefault('DATA_DIR', tmpdir.name)
|
||||||
os.environ.setdefault('PRETIX_CONFIG_FILE', 'test/sqlite.cfg')
|
if os.path.exists('test/sqlite.cfg'):
|
||||||
|
os.environ.setdefault('PRETIX_CONFIG_FILE', 'test/sqlite.cfg')
|
||||||
|
|
||||||
from pretix.settings import * # NOQA
|
from pretix.settings import * # NOQA
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user