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
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
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