예제 #1
0
def svc_client_cache(mock_redis):
    """Service jobs fixture."""
    from renku.service.entrypoint import create_app

    flask_app = create_app()

    testing_client = flask_app.test_client()
    testing_client.testing = True

    ctx = flask_app.app_context()
    ctx.push()

    yield testing_client, flask_app.config.get('cache')

    ctx.pop()
예제 #2
0
def svc_client(mock_redis):
    """Renku service client."""
    from renku.service.entrypoint import create_app

    flask_app = create_app()

    testing_client = flask_app.test_client()
    testing_client.testing = True

    ctx = flask_app.app_context()
    ctx.push()

    yield testing_client

    ctx.pop()
예제 #3
0
def svc_client_cache(mock_redis):
    """Service jobs fixture."""
    from renku.service.entrypoint import create_app

    flask_app = create_app()

    testing_client = flask_app.test_client()
    testing_client.testing = True

    ctx = flask_app.app_context()
    ctx.push()

    headers = {
        'Content-Type': 'application/json',
        'Renku-User-Id': 'user',
        'Renku-User-FullName': 'full name',
        'Renku-User-Email': '*****@*****.**',
    }

    yield testing_client, headers, flask_app.config.get('cache')

    ctx.pop()
예제 #4
0
def svc_client_cache(mock_redis):
    """Service jobs fixture."""
    from renku.service.entrypoint import create_app

    flask_app = create_app()

    testing_client = flask_app.test_client()
    testing_client.testing = True

    ctx = flask_app.app_context()
    ctx.push()

    headers = {
        "Content-Type": "application/json",
        "Renku-User-Id": "user",
        "Renku-User-FullName": "full name",
        "Renku-User-Email": "*****@*****.**",
    }

    yield testing_client, headers, flask_app.config.get("cache")

    ctx.pop()