From ed314ed688b5773b7da5ca6b8e10157a0cd54315 Mon Sep 17 00:00:00 2001 From: bolyachevets Date: Thu, 5 Sep 2024 13:17:08 -0700 Subject: [PATCH] path2 --- queue_services/auth-queue/tests/conftest.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/queue_services/auth-queue/tests/conftest.py b/queue_services/auth-queue/tests/conftest.py index 29ce3f1d51..093689ded7 100644 --- a/queue_services/auth-queue/tests/conftest.py +++ b/queue_services/auth-queue/tests/conftest.py @@ -68,9 +68,15 @@ def db(app): # pylint: disable=redefined-outer-name, invalid-name # This is the path we'll use in legal_api!! # even though this isn't referenced directly, it sets up the internal configs that upgrade + import os import sys + + venv_src_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '.venv/src/sbc-auth/auth-api')) + if venv_src_path not in sys.path: + sys.path.insert(0, venv_src_path) + auth_api_folder = [folder for folder in sys.path if 'auth-api' in folder][0] - migration_path = auth_api_folder.replace('/auth-api/src', '/auth-api/migrations') + migration_path = auth_api_folder.replace('/auth-api', '/auth-api/migrations') Migrate(app, _db, directory=migration_path) upgrade()