Pagination contract is not standardized across endpoints
This commit is contained in:
@@ -85,7 +85,7 @@ def _make_import_result() -> ImportRunResult:
|
||||
|
||||
def _make_log_response() -> ImportLogListResponse:
|
||||
return ImportLogListResponse(
|
||||
items=[], total=0, page=1, page_size=50, total_pages=1
|
||||
items=[], total=0, page=1, page_size=50
|
||||
)
|
||||
|
||||
|
||||
@@ -457,10 +457,10 @@ class TestImportLog:
|
||||
assert resp.status_code == 200
|
||||
|
||||
async def test_log_response_shape(self, bl_client: AsyncClient) -> None:
|
||||
"""Log response has items, total, page, page_size, total_pages."""
|
||||
"""Log response has items, total, page, page_size."""
|
||||
resp = await bl_client.get("/api/blocklists/log")
|
||||
body = resp.json()
|
||||
for key in ("items", "total", "page", "page_size", "total_pages"):
|
||||
for key in ("items", "total", "page", "page_size"):
|
||||
assert key in body
|
||||
|
||||
async def test_log_empty_when_no_runs(self, bl_client: AsyncClient) -> None:
|
||||
|
||||
Reference in New Issue
Block a user