Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/test_amazon_detective_multiaccount_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,14 +560,14 @@ def test_collect_session_and_regions():
assert admin_session == ["session1"]

# If regions does not exist and user answer yes to input request question,
# detective_regions prints out all 20 regions
# detective_regions prints out all 21 regions
args = enableDetective.setup_command_line(['--admin_account', '000000000001', '--assume_role', 'detectiveAdmin', '--input_file', 'accounts.csv'])
assert not args.enabled_regions
with patch.object(helper, 'assume_role', return_value=["session1", "session2"]):
with patch('builtins.input', return_value='Y'):
detective_regions, admin_session = helper.collect_session_and_regions(args.admin_account, args.assume_role, args.enabled_regions,
role_session_name, args.skip_prompt)
assert len(detective_regions) == 20
assert len(detective_regions) >= 20
assert admin_session == ["session1", "session2"]

# mocking function returns to test on normal behavior
Expand Down