Example #1
0
def client():
    layman.config['TESTING'] = True
    layman.config['SERVER_NAME'] = settings.LAYMAN_SERVER_NAME
    layman.config['SESSION_COOKIE_DOMAIN'] = settings.LAYMAN_SERVER_NAME
    client = layman.test_client()

    with layman.app_context():
        yield client
Example #2
0
def client():
    client = app.test_client()

    app.config['TESTING'] = True
    app.config['DEBUG'] = True
    app.config['SERVER_NAME'] = settings.LAYMAN_SERVER_NAME
    app.config['SESSION_COOKIE_DOMAIN'] = settings.LAYMAN_SERVER_NAME

    yield client
Example #3
0
def client():
    # print('before app.test_client()')
    client = app.test_client()

    app.config['TESTING'] = True
    app.config['DEBUG'] = True
    app.config['SERVER_NAME'] = settings.LAYMAN_SERVER_NAME
    app.config['SESSION_COOKIE_DOMAIN'] = settings.LAYMAN_SERVER_NAME

    # print('before app.app_context()')
    with app.app_context():
        yield client