From fcc3ce60bcfa57734a51723717fe681ee4bf1327 Mon Sep 17 00:00:00 2001 From: Frederick Yin Date: Sat, 5 Feb 2022 16:39:41 +0800 Subject: Config format switched to .ini Eliminated toml from dependency list --- jimbrella/test/test_routine.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'jimbrella/test/test_routine.py') diff --git a/jimbrella/test/test_routine.py b/jimbrella/test/test_routine.py index 8d718be..b49ad28 100644 --- a/jimbrella/test/test_routine.py +++ b/jimbrella/test/test_routine.py @@ -9,15 +9,7 @@ from ..routine import sync_jform, process_overdue from ..umbrellas import Umbrellas from ..jform import JForm from ..admin_log import AdminLog -from ..config import * - -"""Set up logging. -logging.basicConfig( - filename="/tmp/jimbrella.log", - encoding="utf-8", - level=logging.INFO, - format="[%(asctime)s] %(levelname)s:%(name)s:%(message)s", -)""" +from ..config import config """Spin up a simple Flask app to mimic jForm.""" jform = Flask(__name__) @@ -65,7 +57,7 @@ if __name__ == "__main__": mock_jform.start() """Initialize Database and JForm.""" - shutil.copyfile(DATABASE_PATH, TEST_DATABASE_PATH) + shutil.copyfile(config.get("general", "db_path"), TEST_DATABASE_PATH) db = Umbrellas(TEST_DATABASE_PATH) takeaway_jform = JForm("takeaway", "http://localhost:5001/takeaway", "/tmp") giveback_jform = JForm("giveback", "http://localhost:5001/giveback", "/tmp") -- cgit v1.2.3