Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update test to reflect region count change #20

Open
wants to merge 1 commit into
base: mainline
Choose a base branch
from
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