diff --git a/conf/config.py b/conf/config.py index a6a907e3..9dd80cb8 100644 --- a/conf/config.py +++ b/conf/config.py @@ -98,8 +98,7 @@ class TestConfiguration(BaseConfiguration): BUILD_LOGS_NAME_FORMAT = "build-{id}.log" LOG_BACKEND = "console" LOG_LEVEL = "debug" - SQLALCHEMY_DATABASE_URI = environ.get( - "DATABASE_URI", "sqlite:///{0}".format(path.join(dbdir, "mbstest.db"))) + SQLALCHEMY_DATABASE_URI = environ.get("DATABASE_URI", "sqlite:///:memory:") DEBUG = True MESSAGING = "in_memory" PDC_URL = "https://pdc.fedoraproject.org/rest_api/v1" diff --git a/tests/__init__.py b/tests/__init__.py index 0f0eead7..ff9235c9 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -109,6 +109,7 @@ def clean_database(add_platform_module=True, add_default_arches=True): # clean_database is usually called before a test run. So, it makes no sense # to keep any changes in the transaction made by previous test. db_session.remove() + db_session.configure(bind=db.session.get_bind()) db.drop_all() db.create_all()