From 5bd3827b26109199e03ed609c1020540dc101e69 Mon Sep 17 00:00:00 2001 From: Asher Foa <1268088+asherf@users.noreply.github.com> Date: Fri, 20 Dec 2019 11:30:36 -0800 Subject: [PATCH] run black --- moto/dynamodb2/models.py | 4 +++- tests/test_dynamodb2/test_dynamodb.py | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/moto/dynamodb2/models.py b/moto/dynamodb2/models.py index 784dfc5d7..0a1b2679f 100644 --- a/moto/dynamodb2/models.py +++ b/moto/dynamodb2/models.py @@ -586,7 +586,9 @@ class StreamRecord(BaseModel): self.record["dynamodb"]["OldImage"] = old_a # This is a substantial overestimate but it's the easiest to do now - self.record["dynamodb"]["SizeBytes"] = len(dynamo_json_dump(self.record["dynamodb"])) + self.record["dynamodb"]["SizeBytes"] = len( + dynamo_json_dump(self.record["dynamodb"]) + ) def to_json(self): return self.record diff --git a/tests/test_dynamodb2/test_dynamodb.py b/tests/test_dynamodb2/test_dynamodb.py index 01768e8e4..a64ba4a8a 100644 --- a/tests/test_dynamodb2/test_dynamodb.py +++ b/tests/test_dynamodb2/test_dynamodb.py @@ -348,6 +348,8 @@ def test_put_item_with_special_chars(): '"': {"S": "foo"}, }, ) + + @requires_boto_gte("2.9") @mock_dynamodb2 def test_put_item_with_streams(): @@ -363,7 +365,10 @@ def test_put_item_with_streams(): TableName=name, KeySchema=[{"AttributeName": "forum_name", "KeyType": "HASH"}], AttributeDefinitions=[{"AttributeName": "forum_name", "AttributeType": "S"}], - StreamSpecification={'StreamEnabled': True, 'StreamViewType': 'NEW_AND_OLD_IMAGES'}, + StreamSpecification={ + "StreamEnabled": True, + "StreamViewType": "NEW_AND_OLD_IMAGES", + }, ProvisionedThroughput={"ReadCapacityUnits": 5, "WriteCapacityUnits": 5}, ) @@ -374,7 +379,7 @@ def test_put_item_with_streams(): "subject": {"S": "Check this out!"}, "Body": {"S": "http://url_to_lolcat.gif"}, "SentBy": {"S": "test"}, - "Data": {"M": {"Key1": {"S": "Value1"}, "Key2": {"S": "Value2"}}} + "Data": {"M": {"Key1": {"S": "Value1"}, "Key2": {"S": "Value2"}}}, }, )