import uuid


def mock_user_pool(mock_cognitoidp_client):
    """Create a mocked cognito user pool used to instantiate a mock AWS Connector

    Args:
        mock_cognitoidp_client: a mocked Cognito IDP client

    Returns:
        dict: containing a mocked user pool id (key: UserPoolId) and a mocked user pool client id (key: UserPoolClientId)

    """
    name = str(uuid.uuid4())
    value = str(uuid.uuid4())
    result_user_pool = mock_cognitoidp_client.create_user_pool(PoolName=name, LambdaConfig={"PreSignUp": value})

    client_name = str(uuid.uuid4())
    value = str(uuid.uuid4())
    user_pool_id = result_user_pool["UserPool"]["Id"]
    result_user_pool_client = mock_cognitoidp_client.create_user_pool_client(
        UserPoolId=user_pool_id,
        ClientName=client_name,
        CallbackURLs=[value]
    )
    return {
        "UserPoolId": user_pool_id,
        "UserPoolClientId": result_user_pool_client["UserPoolClient"]["ClientId"],
    }