fix: Lint fixes of last tests
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"""Test configuration and fixtures."""
|
||||
# ruff: noqa: ANN401, ANN001
|
||||
|
||||
import asyncio
|
||||
from collections.abc import AsyncGenerator
|
||||
@@ -7,12 +8,15 @@ from typing import Any
|
||||
import pytest
|
||||
import pytest_asyncio
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from httpx import ASGITransport, AsyncClient
|
||||
from sqlalchemy.ext.asyncio import create_async_engine
|
||||
from sqlmodel import SQLModel, select
|
||||
from sqlmodel.ext.asyncio.session import AsyncSession
|
||||
|
||||
from app.api import api_router
|
||||
from app.core.database import get_db
|
||||
from app.middleware.logging import LoggingMiddleware
|
||||
from app.models.plan import Plan
|
||||
from app.models.user import User
|
||||
from app.utils.auth import JWTUtils, PasswordUtils
|
||||
@@ -61,14 +65,8 @@ async def test_session(test_engine: Any) -> AsyncGenerator[AsyncSession, None]:
|
||||
|
||||
|
||||
@pytest_asyncio.fixture
|
||||
async def test_app(test_session: AsyncSession):
|
||||
async def test_app(test_session: AsyncSession) -> FastAPI:
|
||||
"""Create a test FastAPI application."""
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
from app.api import api_router
|
||||
from app.middleware.logging import LoggingMiddleware
|
||||
|
||||
# Create FastAPI app directly for testing (without Socket.IO)
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user