- Reformatted function signatures in `organization_service.py` and `task_service.py` for better alignment. - Updated import statements across multiple files for consistency and organization. - Enhanced test files by improving formatting and ensuring consistent use of async session factories. - Added type hints and improved type safety in various service and test files. - Adjusted `pyproject.toml` to include configuration for isort, mypy, and ruff for better code quality checks. - Cleaned up unused imports and organized existing ones in several test files.
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
"""API tests for deal endpoints."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from decimal import Decimal
|
||||
|
||||
import pytest
|
||||
from app.models.activity import Activity, ActivityType
|
||||
from app.models.deal import Deal, DealStage, DealStatus
|
||||
from httpx import AsyncClient
|
||||
from sqlalchemy import select
|
||||
from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker
|
||||
|
||||
from app.models.activity import Activity, ActivityType
|
||||
from app.models.deal import Deal, DealStage, DealStatus
|
||||
|
||||
from tests.api.v1.task_activity_shared import auth_headers, make_token, prepare_scenario
|
||||
|
||||
|
||||
@@ -105,7 +104,7 @@ async def test_update_deal_endpoint_updates_stage_and_logs_activity(
|
||||
|
||||
async with session_factory() as session:
|
||||
activity_types = await session.scalars(
|
||||
select(Activity.type).where(Activity.deal_id == scenario.deal_id)
|
||||
select(Activity.type).where(Activity.deal_id == scenario.deal_id),
|
||||
)
|
||||
collected = set(activity_types.all())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user