From 89cbd7d4b1b66afe25a0af13256f7b001f931dae Mon Sep 17 00:00:00 2001 From: Thomas Duval Date: Thu, 14 Dec 2017 10:17:13 +0100 Subject: Fix a bug in configuration of unit tests. Change-Id: Ie2e73142f99bd7fcf015590673b25cde7c685f80 --- moonv4/moon_db/tests/unit_python/conftest.py | 4 ++-- moonv4/moon_manager/tests/unit_python/conftest.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'moonv4') diff --git a/moonv4/moon_db/tests/unit_python/conftest.py b/moonv4/moon_db/tests/unit_python/conftest.py index 6cce944e..b9f38d7c 100644 --- a/moonv4/moon_db/tests/unit_python/conftest.py +++ b/moonv4/moon_db/tests/unit_python/conftest.py @@ -192,9 +192,9 @@ def set_consul_and_db(monkeypatch): "id": "1111111111111" }]} ) - from moon_db.db_manager import init_engine, run + from moon_db.db_manager import init_engine, main engine = init_engine() - run("upgrade", logging.getLogger("db_manager"), engine) + main("upgrade", logging.getLogger("db_manager"), engine) yield m os.unlink(CONF['database']['url'].replace("sqlite:///", "")) diff --git a/moonv4/moon_manager/tests/unit_python/conftest.py b/moonv4/moon_manager/tests/unit_python/conftest.py index 58f04af2..d6f518f7 100644 --- a/moonv4/moon_manager/tests/unit_python/conftest.py +++ b/moonv4/moon_manager/tests/unit_python/conftest.py @@ -176,10 +176,10 @@ def no_requests(monkeypatch): }]} ) print("Start populating the DB.") - from moon_db.db_manager import init_engine, run + from moon_db.db_manager import init_engine, main engine = init_engine() print("engine={}".format(engine)) - run("upgrade", logging.getLogger("db_manager"), engine) + main("upgrade", logging.getLogger("db_manager"), engine) print("End populating the DB.") yield m -- cgit 1.2.3-korg