15 lines
357 B
Python
15 lines
357 B
Python
# Standard library imports
|
|
import os
|
|
|
|
# PyQt imports
|
|
|
|
# Third party imports
|
|
|
|
# App imports
|
|
# Set up test database before importing db
|
|
# https://blog.miguelgrinberg.com/post/how-to-write-unit-tests-in-python-part-3-web-applications
|
|
DB_FILE = "/tmp/mm.db"
|
|
if os.path.exists(DB_FILE):
|
|
os.unlink(DB_FILE)
|
|
os.environ["DATABASE_URL"] = "sqlite:///" + DB_FILE
|