# Path: simplekv/_compat.py
# PY2 = sys.version_info[0] == 2


from simplekv._compat import ConfigParser
from contextlib import contextmanager
from uuid import uuid4 as uuid
        from boto.s3.connection import OrdinaryCallingFormat
import pytest
    import boto3
@contextmanager
def boto3_bucket(access_key, secret_key, host,
                 bucket_name=None, **kwargs):
    name = bucket_name or 'testrun-bucket-{}'.format(uuid())
    s3_client = boto3.client('s3')
    s3_client.create_bucket(Bucket=name)
    s3_resource = boto3.resource('s3')
    bucket = s3_resource.Bucket(name)

    yield bucket

    for key in bucket.objects.all():
        key.delete()
    bucket.delete()


def load_boto_credentials():
    # loaded from the same place tox.ini. here's a sample
    #
    # [my-s3]
    # access_key=foo
    # secret_key=bar
    # connect_func=connect_s3
    #
    # [my-gs]
    # access_key=foo
    # secret_key=bar
    # connect_func=connect_gs
    cfg_fn = 'boto_credentials.ini'


# Path: simplekv/_compat.py
# PY2 = sys.version_info[0] == 2


# Path: tests/bucket_manager.py
from simplekv._compat import ConfigParser
from contextlib import contextmanager
from uuid import uuid4 as uuid
        from boto.s3.connection import OrdinaryCallingFormat
import pytest
    import boto3

@contextmanager
def boto3_bucket(access_key, secret_key, host,
                 bucket_name=None, **kwargs):
    name = bucket_name or 'testrun-bucket-{}'.format(uuid())
    s3_client = boto3.client('s3')
    s3_client.create_bucket(Bucket=name)
    s3_resource = boto3.resource('s3')
    bucket = s3_resource.Bucket(name)

    yield bucket

    for key in bucket.objects.all():
        key.delete()
    bucket.delete()


def load_boto_credentials():
    # loaded from the same place tox.ini. here's a sample
    #
    # [my-s3]
    # access_key=foo
    # secret_key=bar
    # connect_func=connect_s3
    #
    # [my-gs]
    # access_key=foo
    # secret_key=bar
    # connect_func=connect_gs
    cfg_fn = 'boto_credentials.ini'


    parser = ConfigParser({'host': 's3.amazonaws.com',