Skip to content

Commit 3c2b458

Browse files
committed
splits tests
1 parent 75b95a6 commit 3c2b458

File tree

4 files changed

+515
-464
lines changed

4 files changed

+515
-464
lines changed

packages/pytest-simcore/src/pytest_simcore/faker_products_data.py

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# pylint: disable=unused-argument
55
# pylint: disable=unused-variable
66
"""
7-
Fixtures to produce fake data for a product:
8-
- it is self-consistent
9-
- granular customization by overriding fixtures
7+
Fixtures to produce fake data for a product:
8+
- it is self-consistent
9+
- granular customization by overriding fixtures
1010
"""
1111

1212
from typing import Any
@@ -65,11 +65,25 @@ def bcc_email(request: pytest.FixtureRequest, product_name: ProductName) -> Emai
6565
)
6666

6767

68+
@pytest.fixture
69+
def support_standard_group_id(faker: Faker) -> int | None:
70+
# NOTE: override to change
71+
return None
72+
73+
6874
@pytest.fixture
6975
def product(
70-
faker: Faker, product_name: ProductName, support_email: EmailStr
76+
faker: Faker,
77+
product_name: ProductName,
78+
support_email: EmailStr,
79+
support_standard_group_id: int | None,
7180
) -> dict[str, Any]:
72-
return random_product(name=product_name, support_email=support_email, fake=faker)
81+
return random_product(
82+
name=product_name,
83+
support_email=support_email,
84+
support_standard_group_id=support_standard_group_id,
85+
fake=faker,
86+
)
7387

7488

7589
@pytest.fixture

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ def fake_task(**overrides) -> dict[str, Any]:
256256
def random_product(
257257
*,
258258
group_id: int | None = None,
259+
support_standard_group_id: int | None = None,
259260
registration_email_template: str | None = None,
260261
fake: Faker = DEFAULT_FAKER,
261262
**overrides,
@@ -302,6 +303,7 @@ def random_product(
302303
"priority": fake.pyint(0, 10),
303304
"max_open_studies_per_user": fake.pyint(1, 10),
304305
"group_id": group_id,
306+
"support_standard_group_id": support_standard_group_id,
305307
}
306308

307309
if ui := fake.random_element(

0 commit comments

Comments
 (0)