1
0
mirror of https://github.com/MarkParker5/STARK.git synced 2024-11-24 08:12:13 +02:00

update test db url

This commit is contained in:
MarkParker5 2022-06-20 17:50:58 +02:00
parent 592718eee9
commit d253c206f9
No known key found for this signature in database
GPG Key ID: C87FA4BD47B5A169

View File

@ -10,6 +10,7 @@ from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine
from main import app
from API.dependencies.database import get_session, get_async_session
from API import models
import config
# Settings
@ -21,12 +22,15 @@ access_token = ''
hub_access_token = ''
hub_refresh_token = ''
db_url = f'sqlite:///{config.src}/test_database.sqlite3'
async_db_url = f'sqlite+aiosqlite:///{config.src}/test_database.sqlite3'
# Dependencies
# sync db
engine = create_engine(
'sqlite:///./test.db', connect_args={'check_same_thread': False}
db_url, connect_args={'check_same_thread': False}
)
create_session = sessionmaker(
@ -40,7 +44,7 @@ def override_get_session() -> Session:
# async db
async_engine = create_async_engine(
'sqlite+aiosqlite:///./test.db', connect_args={'check_same_thread': False}
async_db_url, connect_args={'check_same_thread': False}
)
create_async_session = sessionmaker(