Skip to content

Commit 476657e

Browse files
committed
add test for exceptions
1 parent 039e14f commit 476657e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

services/web/server/tests/unit/with_dbs/01/test_catalog_rest_client.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
)
1010
from pytest_simcore.helpers.webserver_login import UserInfoDict
1111
from servicelib.aiohttp import status
12+
from simcore_service_webserver.catalog._exceptions import (
13+
DefaultPricingUnitForServiceNotFoundError,
14+
)
1215
from simcore_service_webserver.catalog.catalog_service import (
1316
get_service_access_rights,
1417
get_services_for_user_in_product,
@@ -98,3 +101,11 @@ async def test_get_service_access_rights(
98101
product_name="osparc",
99102
)
100103
assert isinstance(access_rights, ServiceAccessRightsGet)
104+
105+
106+
async def test_catalog_exceptions():
107+
108+
error = DefaultPricingUnitForServiceNotFoundError(
109+
service_key="key", service_version="version"
110+
)
111+
assert isinstance(error.debug_message(), str)

0 commit comments

Comments
 (0)