File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,14 +19,14 @@ repos:
1919
2020 - id : ty
2121 name : ty
22- entry : bash -c 'cd backend && uv run ty check app'
22+ entry : bash -c 'export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" && cd backend && uv run ty check app'
2323 language : system
2424 files : ^backend/.*\.py$
2525 pass_filenames : false
2626
2727 - id : eslint
2828 name : eslint
29- entry : bash -c 'export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" && cd frontend && node_modules/.bin/eslint src '
29+ entry : bash -c 'export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" && cd frontend && node_modules/.bin/eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0 '
3030 language : system
3131 files : ^frontend/src/.*\.(ts|tsx)$
3232 pass_filenames : false
Original file line number Diff line number Diff line change 1616# Tests use plain HTTP (base_url="http://test"), so the Secure cookie flag must be off
1717# or httpx will not send the cookie back on subsequent requests.
1818settings .cookie_secure = False
19- from app .database import get_async_session
20- from app .models import Base
21- from app .models .user import User , UserRole
19+ from app .database import get_async_session # noqa: E402
20+ from app .models import Base # noqa: E402
21+ from app .models .user import User , UserRole # noqa: E402
2222
2323# Suppress Prefect logging warnings during tests
2424os .environ ["PREFECT_LOGGING_TO_API_WHEN_MISSING_FLOW" ] = "ignore"
Original file line number Diff line number Diff line change @@ -7,3 +7,17 @@ async def test_health_endpoint(client: AsyncClient):
77 response = await client .get ("/health" )
88 assert response .status_code == 200
99 assert response .json () == {"status" : "ok" }
10+
11+
12+ @pytest .mark .asyncio
13+ async def test_swagger_ui (client : AsyncClient ):
14+ response = await client .get ("/swagger" )
15+ assert response .status_code == 200
16+ assert "text/html" in response .headers ["content-type" ]
17+
18+
19+ @pytest .mark .asyncio
20+ async def test_redoc_ui (client : AsyncClient ):
21+ response = await client .get ("/redoc" )
22+ assert response .status_code == 200
23+ assert "text/html" in response .headers ["content-type" ]
Original file line number Diff line number Diff line change @@ -6,6 +6,6 @@ REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
66cd " $REPO_ROOT /backend"
77unset VIRTUAL_ENV
88
9- uv run ruff check --fix app
10- uv run ruff format app
9+ uv run ruff check --fix .
10+ uv run ruff format .
1111uv run ty check app
Original file line number Diff line number Diff line change @@ -5,6 +5,6 @@ REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
55
66cd " $REPO_ROOT /frontend"
77
8- node_modules/.bin/prettier --write src
9- node_modules/.bin/eslint src
8+ node_modules/.bin/prettier --write ' src/**/*.{ts,tsx} '
9+ node_modules/.bin/eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0
1010node_modules/.bin/tsc --noEmit
You can’t perform that action at this time.
0 commit comments