Skip to content

Commit 1e7eea2

Browse files
committed
fixes tests fixtures
1 parent 47eb205 commit 1e7eea2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,16 @@ async def _create_user_in_db(
4545
data = data or {}
4646
data.setdefault("status", UserStatus.ACTIVE.name)
4747
data.setdefault("role", UserRole.USER.name)
48+
data.setdefault("password", DEFAULT_TEST_PASSWORD)
4849

49-
raw_password = DEFAULT_TEST_PASSWORD
50+
raw_password = data["password"]
5051

5152
# inject in db
5253
user = await exit_stack.enter_async_context(
5354
insert_and_get_row_lifespan( # pylint:disable=contextmanager-generator-missing-cleanup
5455
sqlalchemy_async_engine,
5556
table=users_table,
56-
values=random_user(password=raw_password, **data),
57+
values=random_user(**data),
5758
pk_col=users_table.c.id,
5859
)
5960
)

services/web/server/tests/unit/with_dbs/03/invitations/test_invitations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ async def test_invalid_invitation_if_guest_is_already_registered_in_product(
9595

9696
# user exists, and we skip product registration to do this test
9797
mocker.patch(
98-
"pytest_simcore.helpers.webserver_login.auto_add_user_to_product_group",
98+
"pytest_simcore.helpers.webserver_users.groups_service.auto_add_user_to_product_group",
9999
return_value=f"Mocked in {__file__}. SKIPPED auto_add_user_to_product_group",
100100
autospec=True,
101101
)

0 commit comments

Comments
 (0)