import uuid


def setup_test_container(swift_client, resource_prefix):
    """Create a swift container for use be tests.

    :param swift_client: Swift client to use for object creation
    :type swift_client: swiftclient.Client
    :returns: (container_name, account_name) Container name and account
              name for new container
    :rtype: Tuple[str, str]
    """
    run_id = str(uuid.uuid1()).split('-')[0]
    container_name = '{}-{}-container'.format(resource_prefix, run_id)
    swift_client.put_container(container_name)
    resp_headers, containers = swift_client.get_account()
    account = resp_headers['x-account-project-domain-id']
    return container_name, account