Skip to content

Commit bf19cdd

Browse files
add catalog test
1 parent 47fab99 commit bf19cdd

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

services/catalog/tests/unit/with_dbs/test_api_rpc.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,25 @@ async def background_sync_task_mocked(
108108
await services_db_tables_injector(fake_data_for_services)
109109

110110

111+
async def test_rpc_catalog_with_no_services_returns_empty_page(
112+
background_sync_task_mocked: None,
113+
mocked_director_service_api: MockRouter,
114+
rpc_client: RabbitMQRPCClient,
115+
user_id: UserID,
116+
app: FastAPI,
117+
):
118+
assert app
119+
120+
page = await list_services_paginated(
121+
rpc_client, product_name="not_existing_returns_no_services", user_id=user_id
122+
)
123+
assert page.data == []
124+
assert page.links.next is None
125+
assert page.links.prev is None
126+
assert page.meta.count == 0
127+
assert page.meta.total == 0
128+
129+
111130
async def test_rpc_catalog_client(
112131
background_sync_task_mocked: None,
113132
mocked_director_service_api: MockRouter,

0 commit comments

Comments
 (0)