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

@ -309,25 +309,29 @@ def test_put_parameter_invalid_names():
client.put_parameter.when.called_with(
Name="ssm_test", Value="value", Type="String"
).should.throw(
ClientError, invalid_prefix_err,
ClientError,
invalid_prefix_err,
)
client.put_parameter.when.called_with(
Name="SSM_TEST", Value="value", Type="String"
).should.throw(
ClientError, invalid_prefix_err,
ClientError,
invalid_prefix_err,
)
client.put_parameter.when.called_with(
Name="aws_test", Value="value", Type="String"
).should.throw(
ClientError, invalid_prefix_err,
ClientError,
invalid_prefix_err,
)
client.put_parameter.when.called_with(
Name="AWS_TEST", Value="value", Type="String"
).should.throw(
ClientError, invalid_prefix_err,
ClientError,
invalid_prefix_err,
)
ssm_path = "/ssm_test/path/to/var"
@ -354,14 +358,16 @@ def test_put_parameter_invalid_names():
client.put_parameter.when.called_with(
Name=aws_path, Value="value", Type="String"
).should.throw(
ClientError, "No access to reserved parameter name: {}.".format(aws_path),
ClientError,
"No access to reserved parameter name: {}.".format(aws_path),
)
aws_path = "/AWS/PATH/TO/VAR"
client.put_parameter.when.called_with(
Name=aws_path, Value="value", Type="String"
).should.throw(
ClientError, "No access to reserved parameter name: {}.".format(aws_path),
ClientError,
"No access to reserved parameter name: {}.".format(aws_path),
)
@ -448,9 +454,7 @@ def test_get_parameter_with_version_and_labels():
with pytest.raises(ClientError) as ex:
client.get_parameter(Name="test-2:2", WithDecryption=False)
ex.value.response["Error"]["Code"].should.equal("ParameterNotFound")
ex.value.response["Error"]["Message"].should.equal(
"Parameter test-2:2 not found."
)
ex.value.response["Error"]["Message"].should.equal("Parameter test-2:2 not found.")
@mock_ssm