def setup(self): self.mocks = [mock_dynamodb2(), mock_dynamodbstreams()] for m in self.mocks: m.start() # create a table with a stream conn = boto3.client("dynamodb", region_name="us-east-1") resp = conn.create_table( TableName="test-streams", KeySchema=[{ "AttributeName": "id", "KeyType": "HASH" }], AttributeDefinitions=[{ "AttributeName": "id", "AttributeType": "S" }], ProvisionedThroughput={ "ReadCapacityUnits": 1, "WriteCapacityUnits": 1 }, StreamSpecification={ "StreamEnabled": True, "StreamViewType": "NEW_AND_OLD_IMAGES", }, ) self.stream_arn = resp["TableDescription"]["LatestStreamArn"]
def setup(self): self.mocks = [mock_dynamodb2(), mock_dynamodbstreams()] for m in self.mocks: m.start() # create a table with a stream conn = boto3.client('dynamodb', region_name='us-east-1') resp = conn.create_table(TableName='test-streams', KeySchema=[{ 'AttributeName': 'id', 'KeyType': 'HASH' }], AttributeDefinitions=[{ 'AttributeName': 'id', 'AttributeType': 'S' }], ProvisionedThroughput={ 'ReadCapacityUnits': 1, 'WriteCapacityUnits': 1 }, StreamSpecification={ 'StreamEnabled': True, 'StreamViewType': 'NEW_AND_OLD_IMAGES' }) self.stream_arn = resp['TableDescription']['LatestStreamArn']
def setup(self): self.mocks = [mock_dynamodb2(), mock_dynamodbstreams()] for m in self.mocks: m.start() # create a table with a stream conn = boto3.client('dynamodb', region_name='us-east-1') resp = conn.create_table( TableName='test-streams', KeySchema=[{'AttributeName': 'id', 'KeyType': 'HASH'}], AttributeDefinitions=[{'AttributeName': 'id', 'AttributeType': 'S'}], ProvisionedThroughput={'ReadCapacityUnits': 1, 'WriteCapacityUnits': 1}, StreamSpecification={ 'StreamEnabled': True, 'StreamViewType': 'NEW_AND_OLD_IMAGES' } ) self.stream_arn = resp['TableDescription']['LatestStreamArn']
def setup(self): self.mocks = [mock_dynamodb2(), mock_dynamodbstreams()] for m in self.mocks: m.start()
def setup(self): self.mocks = [mock_dynamodb2(), mock_dynamodbstreams()] for m in self.mocks: m.start()