88import pytest
99from aiohttp import web
1010from aiohttp .test_utils import TestClient
11+ from faker import Faker
1112from models_library .api_schemas_catalog .services import ServiceGetV2
1213from models_library .api_schemas_webserver .catalog import (
1314 CatalogServiceGet ,
2223from pydantic import NonNegativeInt , TypeAdapter
2324from pytest_mock import MockerFixture
2425from pytest_simcore .helpers .assert_checks import assert_status
26+ from pytest_simcore .helpers .faker_factories import random_icon_url
2527from pytest_simcore .helpers .monkeypatch_envs import setenvs_from_dict
2628from pytest_simcore .helpers .typing_env import EnvVarsDict
2729from pytest_simcore .helpers .webserver_login import UserInfoDict
@@ -162,6 +164,7 @@ async def test_get_and_patch_service(
162164 client : TestClient ,
163165 logged_user : UserInfoDict ,
164166 mocked_rpc_catalog_service_api : dict [str , MagicMock ],
167+ faker : Faker ,
165168):
166169 assert client .app
167170 assert client .app .router
@@ -190,8 +193,8 @@ async def test_get_and_patch_service(
190193 # PATCH
191194 update = CatalogServiceUpdate (
192195 name = "foo" ,
193- thumbnail = None ,
194196 description = "bar" ,
197+ icon = random_icon_url (faker ),
195198 classifiers = None ,
196199 versionDisplay = "Some nice name" ,
197200 descriptionUi = True ,
@@ -209,6 +212,7 @@ async def test_get_and_patch_service(
209212 assert model .key == service_key
210213 assert model .version == service_version
211214 assert model .name == update .name
215+ assert model .icon == update .icon
212216 assert model .description == update .description
213217 assert model .description_ui == update .description_ui
214218 assert model .version_display == update .version_display
0 commit comments