From f89d06d092aa0f20a7b267b6cb274ae175c294df Mon Sep 17 00:00:00 2001 From: Kevin Morris Date: Sat, 19 Jun 2021 05:20:23 -0700 Subject: [PATCH] setup_test_db: remove mysql-dependent coverage path Signed-off-by: Kevin Morris --- aurweb/testing/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aurweb/testing/__init__.py b/aurweb/testing/__init__.py index 90d46720..65d34253 100644 --- a/aurweb/testing/__init__.py +++ b/aurweb/testing/__init__.py @@ -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.