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

@ -152,7 +152,9 @@ def test_publish_to_sqs_msg_attr_byte_value():
sqs = boto3.resource("sqs", region_name="us-east-1")
queue = sqs.create_queue(QueueName="test-queue")
conn.subscribe(
TopicArn=topic_arn, Protocol="sqs", Endpoint=queue.attributes["QueueArn"],
TopicArn=topic_arn,
Protocol="sqs",
Endpoint=queue.attributes["QueueArn"],
)
queue_raw = sqs.create_queue(QueueName="test-queue-raw")
conn.subscribe(

View file

@ -525,7 +525,9 @@ def test_untag_resource_error():
@mock_sns
def test_topic_kms_master_key_id_attribute():
client = boto3.client("sns", region_name="us-west-2")
resp = client.create_topic(Name="test-sns-no-key-attr",)
resp = client.create_topic(
Name="test-sns-no-key-attr",
)
topic_arn = resp["TopicArn"]
resp = client.get_topic_attributes(TopicArn=topic_arn)
resp["Attributes"].should_not.have.key("KmsMasterKeyId")
@ -538,7 +540,10 @@ def test_topic_kms_master_key_id_attribute():
resp["Attributes"]["KmsMasterKeyId"].should.equal("test-key")
resp = client.create_topic(
Name="test-sns-with-key-attr", Attributes={"KmsMasterKeyId": "key-id",}
Name="test-sns-with-key-attr",
Attributes={
"KmsMasterKeyId": "key-id",
},
)
topic_arn = resp["TopicArn"]
resp = client.get_topic_attributes(TopicArn=topic_arn)