Skip to content

Commit

Permalink
path2
Browse files Browse the repository at this point in the history
  • Loading branch information
bolyachevets committed Sep 5, 2024
1 parent 5524db4 commit ed314ed
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion queue_services/auth-queue/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit ed314ed

Please sign in to comment.