Files
trading-journal/backend/tests/test_app.py
Tianyu Liu 1fbc93353d
All checks were successful
Backend CI / unit-test (push) Successful in 35s
add exchange table
2025-09-22 14:33:32 +02:00

19 lines
437 B
Python

from collections.abc import Generator
import pytest
from fastapi.testclient import TestClient
from app import API_BASE, app
@pytest.fixture
def client() -> Generator[TestClient, None, None]:
with TestClient(app) as client:
yield client
def test_get_status(client: TestClient) -> None:
response = client.get(f"{API_BASE}/status")
assert response.status_code == 200
assert response.json() == {"status": "ok"}