Skip to content

Commit 8e2ec78

Browse files
committed
Add additional test cases in response to PR feedback
1 parent 2aaef05 commit 8e2ec78

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

enableDetective.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ def enable_detective(d_client: botocore.client.BaseClient, region: str, tags: di
303303
confirm = input('Should Amazon Detective be enabled in {}? Enter [Y/N]: '.format(region))
304304

305305
if confirm == 'Y' or confirm == 'y':
306-
logging.info(f'Enabling Amazon Detective in {region}' + (f'with tags {tags}' if tags else ''))
306+
logging.info(f'Enabling Amazon Detective in {region}' + (f' with tags {tags}' if tags else ''))
307307
graphs = [d_client.create_graph(Tags=tags)['GraphArn']]
308308
else:
309309
logging.info(f'Skipping {region}')

tests/test_scripts.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ def test_setup_command_line_enableDetective():
2626
assert args.master_account == '000000000001'
2727
assert args.tags == None
2828

29-
args = enableDetective.setup_command_line("--master_account 123456789012 --assume_role detectiveAdmin --input_file accounts.csv --tags TagKey1=TagValue1,TagKey2=TagValue2,TagKey3=TagValue3".split(" "))
29+
args = enableDetective.setup_command_line("--master_account 123456789012 --assume_role detectiveAdmin --input_file accounts.csv --tags TagKey1=TagValue1,TagKey2=TagValue2,TagKey3=TagValue3,TagKey4=,TagKey5=TagValue5".split(" "))
3030
assert args.tags == {
3131
"TagKey1": "TagValue1",
3232
"TagKey2": "TagValue2",
3333
"TagKey3": "TagValue3",
34+
"TagKey4": "",
35+
"TagKey5": "TagValue5",
3436
}
3537

3638
# Wrong master account

0 commit comments

Comments
 (0)