예제 #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
예제 #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
예제 #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