ref: Remove unused sync session_scope, with_session and engine (#5333)
Remove unused sync session_scope, with_session and engine
This commit is contained in:
parent
9bf372ee3e
commit
3f0e383135
20 changed files with 75 additions and 114 deletions
|
|
@ -400,7 +400,7 @@ async def test_user(client):
|
|||
@pytest.fixture
|
||||
async def active_user(client): # noqa: ARG001
|
||||
db_manager = get_db_service()
|
||||
async with db_manager.with_async_session() as session:
|
||||
async with db_manager.with_session() as session:
|
||||
user = User(
|
||||
username="activeuser",
|
||||
password=get_password_hash("testpassword"),
|
||||
|
|
@ -418,7 +418,7 @@ async def active_user(client): # noqa: ARG001
|
|||
yield user
|
||||
# Clean up
|
||||
# Now cleanup transactions, vertex_build
|
||||
async with db_manager.with_async_session() as session:
|
||||
async with db_manager.with_session() as session:
|
||||
user = await session.get(User, user.id, options=[selectinload(User.flows)])
|
||||
await _delete_transactions_and_vertex_builds(session, user.flows)
|
||||
await session.delete(user)
|
||||
|
|
@ -439,7 +439,7 @@ async def logged_in_headers(client, active_user):
|
|||
@pytest.fixture
|
||||
async def active_super_user(client): # noqa: ARG001
|
||||
db_manager = get_db_service()
|
||||
async with db_manager.with_async_session() as session:
|
||||
async with db_manager.with_session() as session:
|
||||
user = User(
|
||||
username="activeuser",
|
||||
password=get_password_hash("testpassword"),
|
||||
|
|
@ -457,7 +457,7 @@ async def active_super_user(client): # noqa: ARG001
|
|||
yield user
|
||||
# Clean up
|
||||
# Now cleanup transactions, vertex_build
|
||||
async with db_manager.with_async_session() as session:
|
||||
async with db_manager.with_session() as session:
|
||||
user = await session.get(User, user.id, options=[selectinload(User.flows)])
|
||||
await _delete_transactions_and_vertex_builds(session, user.flows)
|
||||
await session.delete(user)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue