Ejemplo n.º 1
0
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()
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
0
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)
Ejemplo n.º 4
0
def kinesis_writer():
    mock_kinesis().start()
    from okdata.pipeline.writers.kinesis import handler

    return handler
Ejemplo n.º 5
0
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
Ejemplo n.º 6
0
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
Ejemplo n.º 7
0
 def setup(self):
     self.mock = moto.mock_kinesis()
     self.mock.start()
Ejemplo n.º 8
0
def kinesis_client(aws_credentials):
    with mock_kinesis():
        conn = boto3.client("kinesis", region_name="us-east-1")
        yield conn
Ejemplo n.º 9
0
def kinesis():
    with mock_kinesis():
        kinesis = boto3.client("kinesis", region_name="us-east-1")
        yield kinesis