def kinesis(): mock = mock_kinesis() mock.start() client = boto3.client("kinesis", region_name="ca-central-1") client.create_stream(StreamName="test-stream", ShardCount=2) yield client mock.stop()
def kinesis(request, clean_boto_configuration): mock = mock_kinesis() mock.start() conn = boto3.client('kinesis') conn.create_stream(StreamName=TEST_STREAM_NAME, ShardCount=1) def teardown(): mock.stop() request.addfinalizer(teardown) return StreamTestHelper(TEST_STREAM_NAME)
def kinesis_writer(): mock_kinesis().start() from okdata.pipeline.writers.kinesis import handler return handler
def kinesis_moto(kinesis_streams, environment): with lpipe.utils.set_env(environment()): with moto.mock_kinesis(): with lpipe.testing.setup_kinesis(kinesis_streams) as streams: yield streams
def kinesis(kinesis_streams, environment): with b3f.utils.set_env(environment()): with moto.mock_kinesis(): with b3f.Service("kinesis", kinesis_streams) as streams: yield streams
def setup(self): self.mock = moto.mock_kinesis() self.mock.start()
def kinesis_client(aws_credentials): with mock_kinesis(): conn = boto3.client("kinesis", region_name="us-east-1") yield conn
def kinesis(): with mock_kinesis(): kinesis = boto3.client("kinesis", region_name="us-east-1") yield kinesis