import pytest from thoughtsync.app import create_app @pytest.fixture def app(): return create_app() async def test_health_ok(app): client = app.test_client() resp = await client.get("/api/health") assert resp.status_code == 200 data = await resp.get_json() assert data["status"] == "ok" assert "version" in data async def test_me_requires_auth(app): client = app.test_client() resp = await client.get("/api/auth/me") assert resp.status_code == 401 async def test_unknown_api_route_404s(app): client = app.test_client() resp = await client.get("/api/does-not-exist") assert resp.status_code == 404