Skip to content

Commit 8cdf85f

Browse files
committed
factory
1 parent f611024 commit 8cdf85f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

packages/pytest-simcore/src/pytest_simcore/helpers/faker_factories.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@
2727
DEFAULT_FAKER: Final = faker.Faker()
2828

2929

30+
def random_icon_url(fake: Faker):
31+
return fake.image_url(width=16, height=16)
32+
33+
34+
def random_thumbnail_url(fake: Faker):
35+
return fake.image_url(width=32, height=32)
36+
37+
3038
def _compute_hash(password: str) -> str:
3139
try:
3240
# 'passlib' will be used only if already installed.
@@ -396,7 +404,8 @@ def random_service_meta_data(
396404
# optional
397405
"description_ui": fake.pybool(),
398406
"owner": owner_primary_gid,
399-
"thumbnail": _pick_from([fake.image_url(), None]), # nullable
407+
"thumbnail": _pick_from([random_thumbnail_url(fake), None]), # nullable
408+
"icon": _pick_from([random_icon_url(fake), None]), # nullable
400409
"version_display": _pick_from([f"v{_version}", None]), # nullable
401410
"classifiers": [], # has default
402411
"quality": {}, # has default

0 commit comments

Comments
 (0)