Run tests in in-memory SQLite db

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
This commit is contained in:
Chenxiong Qi
2019-11-14 14:55:27 +08:00
parent 5979f7cd97
commit 2101f38e63
2 changed files with 2 additions and 2 deletions

View File

@@ -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()