Back to Black

This commit is contained in:
Matěj Cepl 2020-10-06 08:46:05 +02:00
commit 5697ff87a8
112 changed files with 1803 additions and 977 deletions

View file

@ -356,8 +356,10 @@ def test_state_machine_can_deleted_nonexisting_machine():
@mock_stepfunctions
def test_state_machine_tagging_non_existent_resource_fails():
client = boto3.client("stepfunctions", region_name=region)
non_existent_arn = "arn:aws:states:{region}:{account}:stateMachine:non-existent".format(
region=region, account=ACCOUNT_ID
non_existent_arn = (
"arn:aws:states:{region}:{account}:stateMachine:non-existent".format(
region=region, account=ACCOUNT_ID
)
)
with assert_raises(ClientError) as ex:
client.tag_resource(resourceArn=non_existent_arn, tags=[])
@ -368,8 +370,10 @@ def test_state_machine_tagging_non_existent_resource_fails():
@mock_stepfunctions
def test_state_machine_untagging_non_existent_resource_fails():
client = boto3.client("stepfunctions", region_name=region)
non_existent_arn = "arn:aws:states:{region}:{account}:stateMachine:non-existent".format(
region=region, account=ACCOUNT_ID
non_existent_arn = (
"arn:aws:states:{region}:{account}:stateMachine:non-existent".format(
region=region, account=ACCOUNT_ID
)
)
with assert_raises(ClientError) as ex:
client.untag_resource(resourceArn=non_existent_arn, tagKeys=[])
@ -386,7 +390,9 @@ def test_state_machine_tagging():
{"key": "tag_key2", "value": "tag_value2"},
]
machine = client.create_state_machine(
name="test", definition=str(simple_definition), roleArn=_get_default_role(),
name="test",
definition=str(simple_definition),
roleArn=_get_default_role(),
)
client.tag_resource(resourceArn=machine["stateMachineArn"], tags=tags)
resp = client.list_tags_for_resource(resourceArn=machine["stateMachineArn"])