diff options
author | Frederick Yin <fkfd@fkfd.me> | 2022-02-05 16:39:41 +0800 |
---|---|---|
committer | Frederick Yin <fkfd@fkfd.me> | 2022-02-05 16:39:41 +0800 |
commit | fcc3ce60bcfa57734a51723717fe681ee4bf1327 (patch) | |
tree | c8d883a6cd2b898fed85a7f717be34de242ded25 /jimbrella/test/test_routine.py | |
parent | 14feb6a4378668d054d28a1335eacd2026b621dc (diff) |
Config format switched to .ini
Eliminated toml from dependency list
Diffstat (limited to 'jimbrella/test/test_routine.py')
-rw-r--r-- | jimbrella/test/test_routine.py | 12 |
1 files changed, 2 insertions, 10 deletions
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") |