Skip to content

Commit b772784

Browse files
committed
improve test and properly update page_params
1 parent 529a9c5 commit b772784

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

services/api-server/src/simcore_service_api_server/api/routes/solvers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ async def get_solvers_page(
114114
offset=page_params.offset,
115115
limit=page_params.limit,
116116
)
117+
page_params.limit = page_meta.limit
118+
page_params.offset = page_meta.offset
117119
return create_page(solvers, total=len(solvers), params=page_params)
118120

119121

services/api-server/tests/unit/api_solvers/test_api_routers_solvers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,4 @@ async def test_list_solver_page_with_mocked_catalog(
116116
):
117117
response = await client.get(f"/{API_VTAG}/solvers/page", auth=auth)
118118
assert response.status_code == status.HTTP_200_OK
119+
assert len(response.json()["items"]) == response.json()["total"]

0 commit comments

Comments
 (0)