From b3a120f537be1a91e6d3d2bbdfd90e2597ce39b9 Mon Sep 17 00:00:00 2001 From: Andreas Albert Date: Fri, 12 Jul 2024 15:29:51 +0200 Subject: [PATCH] fix --- quetz/tests/test_cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quetz/tests/test_cli.py b/quetz/tests/test_cli.py index 106942c2..fe8f8e3f 100644 --- a/quetz/tests/test_cli.py +++ b/quetz/tests/test_cli.py @@ -122,9 +122,11 @@ def test_set_user_roles_user_has_role( current_role: str, default_role: str | None, ): - # Arrange: The user has `current_role` before we call the CLI + # Arrange: Assign `current_role` to the user before we call the CLI with session_maker_expire_on_commit() as db: + user = db.query(User).filter(User.username == "bartosz").one_or_none() user.role = current_role + assert user.role == current_role db.commit() # Act: Call the CLI