mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
setup_test_db: remove mysql-dependent coverage path
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
b7d67bf5fc
commit
f89d06d092
1 changed files with 2 additions and 2 deletions
|
@ -50,7 +50,7 @@ def setup_test_db(*args):
|
|||
|
||||
db_backend = aurweb.config.get("database", "backend")
|
||||
|
||||
if db_backend != "sqlite":
|
||||
if db_backend != "sqlite": # pragma: no cover
|
||||
aurweb.db.session.execute("SET FOREIGN_KEY_CHECKS = 0")
|
||||
else:
|
||||
# We're using sqlite, setup tables to be deleted without violating
|
||||
|
@ -61,7 +61,7 @@ def setup_test_db(*args):
|
|||
for table in tables:
|
||||
aurweb.db.session.execute(f"DELETE FROM {table}")
|
||||
|
||||
if db_backend != "sqlite":
|
||||
if db_backend != "sqlite": # pragma: no cover
|
||||
aurweb.db.session.execute("SET FOREIGN_KEY_CHECKS = 1")
|
||||
|
||||
# Expunge all objects from SQLAlchemy's IdentityMap.
|
||||
|
|
Loading…
Add table
Reference in a new issue