Files
wehub-resource-sync 5296d0e97c
CI / Ban suppressions and legacy annotations (push) Has been cancelled
CI / pytest (push) Has been cancelled
CI / ruff-check (push) Has been cancelled
CI / ruff-format (push) Has been cancelled
CI / ty (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:35:44 +08:00

22 lines
655 B
Python

import warnings
from fastapi.testclient import TestClient
from free_claude_code.core.version import package_version
from tests.api.support import create_test_app
def test_fastapi_and_openapi_report_installed_package_version() -> None:
app = create_test_app()
assert app.version == package_version()
with warnings.catch_warnings():
warnings.filterwarnings(
"ignore",
message="Duplicate Operation ID",
category=UserWarning,
)
response = TestClient(app).get("/openapi.json")
assert response.status_code == 200
assert response.json()["info"]["version"] == package_version()