diff options
Diffstat (limited to 'jimbrella/test/test_routine.py')
-rw-r--r-- | jimbrella/test/test_routine.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/jimbrella/test/test_routine.py b/jimbrella/test/test_routine.py index 2a65b35..0b15717 100644 --- a/jimbrella/test/test_routine.py +++ b/jimbrella/test/test_routine.py @@ -8,6 +8,7 @@ from .jform_data import mock_jform_data from ..routine import sync_database, process_overdue from ..database import Database from ..jform import JForm +from ..admin_log import AdminLog from ..config import * """Set up logging.""" @@ -58,12 +59,14 @@ def api(endpoint): Thread(target=jform.run, kwargs={"port": 5001}).start() """Initialize Database and JForm.""" -TEST_DATABASE_PATH = "/tmp/jimbrella.test.db.csv" +TEST_DATABASE_PATH = "/tmp/jimbrella.db.csv" +TEST_ADMIN_LOG_PATH = "/tmp/jimbrella.admin.log" shutil.copyfile(DATABASE_PATH, TEST_DATABASE_PATH) db = Database(TEST_DATABASE_PATH) takeaway_jform = JForm("takeaway", "http://localhost:5001/takeaway", "/tmp") giveback_jform = JForm("giveback", "http://localhost:5001/giveback", "/tmp") -sync_database(takeaway_jform, giveback_jform, db) +admin = AdminLog(TEST_ADMIN_LOG_PATH) +sync_database(takeaway_jform, giveback_jform, db, admin) process_overdue(db) """Cleanup""" |