Exemple #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()
Exemple #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)
Exemple #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)
def kinesis_writer():
    mock_kinesis().start()
    from okdata.pipeline.writers.kinesis import handler

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