27 lines
855 B
Python
27 lines
855 B
Python
from fastapi.testclient import TestClient
|
|
|
|
from tests.api.conftest import SUT_ONE
|
|
|
|
|
|
def test_sut_list_contains_safe_summary(client: TestClient) -> None:
|
|
response = client.get("/api/v1/suts?limit=100")
|
|
assert response.status_code == 200
|
|
assert response.json() == {
|
|
"data": [SUT_ONE, {**SUT_ONE, "id": "sut-2"}],
|
|
"meta": {"next_cursor": None, "total": 2},
|
|
}
|
|
|
|
|
|
def test_sut_detail_contains_registered_limits_and_ranges(client: TestClient) -> None:
|
|
response = client.get("/api/v1/suts/sut-1")
|
|
assert response.status_code == 200
|
|
assert response.json() == {
|
|
"data": {
|
|
**SUT_ONE,
|
|
"timeout_seconds": 30,
|
|
"max_batch_size": 1,
|
|
"capability_ranges": [{"name": "top_k", "minimum": 1, "maximum": 3}],
|
|
},
|
|
"meta": {"next_cursor": None, "total": 1},
|
|
}
|