typo
This commit is contained in:
parent
f93b9a86e9
commit
7220969feb
@ -264,7 +264,7 @@ class KinesisBackend(BaseBackend):
|
|||||||
for record in records:
|
for record in records:
|
||||||
partition_key = record.get("PartitionKey")
|
partition_key = record.get("PartitionKey")
|
||||||
explicit_hash_key = record.get("ExplicitHashKey")
|
explicit_hash_key = record.get("ExplicitHashKey")
|
||||||
data = record.get("data")
|
data = record.get("Data")
|
||||||
|
|
||||||
sequence_number, shard_id = stream.put_record(
|
sequence_number, shard_id = stream.put_record(
|
||||||
partition_key, explicit_hash_key, None, data
|
partition_key, explicit_hash_key, None, data
|
||||||
|
@ -4,6 +4,7 @@ import json
|
|||||||
|
|
||||||
from moto.core.responses import BaseResponse
|
from moto.core.responses import BaseResponse
|
||||||
from .models import kinesis_backends
|
from .models import kinesis_backends
|
||||||
|
from werkzeug.exceptions import BadRequest
|
||||||
|
|
||||||
|
|
||||||
class KinesisResponse(BaseResponse):
|
class KinesisResponse(BaseResponse):
|
||||||
@ -24,7 +25,9 @@ class KinesisResponse(BaseResponse):
|
|||||||
def create_stream(self):
|
def create_stream(self):
|
||||||
stream_name = self.parameters.get('StreamName')
|
stream_name = self.parameters.get('StreamName')
|
||||||
shard_count = self.parameters.get('ShardCount')
|
shard_count = self.parameters.get('ShardCount')
|
||||||
self.kinesis_backend.create_stream(stream_name, shard_count, self.region)
|
stream = self.kinesis_backend.create_stream(stream_name, shard_count, self.region)
|
||||||
|
if isinstance(stream, BadRequest):
|
||||||
|
return stream.description
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
def describe_stream(self):
|
def describe_stream(self):
|
||||||
@ -43,7 +46,6 @@ class KinesisResponse(BaseResponse):
|
|||||||
def delete_stream(self):
|
def delete_stream(self):
|
||||||
stream_name = self.parameters.get("StreamName")
|
stream_name = self.parameters.get("StreamName")
|
||||||
self.kinesis_backend.delete_stream(stream_name)
|
self.kinesis_backend.delete_stream(stream_name)
|
||||||
|
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
def get_shard_iterator(self):
|
def get_shard_iterator(self):
|
||||||
@ -91,7 +93,7 @@ class KinesisResponse(BaseResponse):
|
|||||||
|
|
||||||
def put_records(self):
|
def put_records(self):
|
||||||
if self.is_firehose:
|
if self.is_firehose:
|
||||||
return self.firehose_put_record()
|
return self.put_record_batch()
|
||||||
stream_name = self.parameters.get("StreamName")
|
stream_name = self.parameters.get("StreamName")
|
||||||
records = self.parameters.get("Records")
|
records = self.parameters.get("Records")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user