Skip to content

Commit f4ba945

Browse files
authored
Fixed AWS CLI tests (#902)
1 parent 9bd5fc5 commit f4ba945

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/unit/test_cli.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,8 @@ def test_validate_groups_membership(ws):
269269
ws.groups.list.assert_called()
270270

271271

272-
def test_save_aws_iam_profiles_no_profile(ws, caplog):
272+
def test_save_aws_iam_profiles_no_profile(ws, caplog, mocker):
273+
mocker.patch("shutil.which", return_value="/path/aws")
273274
save_aws_iam_profiles(ws)
274275
assert any({"AWS Profile is not specified." in message for message in caplog.messages})
275276

@@ -294,7 +295,8 @@ def test_save_aws_iam_profiles_no_cli(ws, mocker, caplog):
294295
assert any({"Couldn't find AWS" in message for message in caplog.messages})
295296

296297

297-
def test_save_uc_roles_no_profile(ws, caplog):
298+
def test_save_uc_roles_no_profile(ws, caplog, mocker):
299+
mocker.patch("shutil.which", return_value="/path/aws")
298300
save_uc_compatible_roles(ws)
299301
assert any({"AWS Profile is not specified." in message for message in caplog.messages})
300302

0 commit comments

Comments
 (0)