def test_errlog():
    client = Client(app_key, app_secret, base_url)
    errLog = ErrorLog(client, index_name)
    ret = yield from errLog.call(1, 50, sort_mode=const.LOG_SORT_ASC)
    print(ret)
    client.session.close()
    assert ret['status'] == 'OK'
def test_errlog_raise2():
    with pytest.raises(const.ArgError):
        client = Client(app_key, app_secret, base_url, lib=client_name)
        errLog = ErrorLog(client, index_name)
        errLog.call(1, 50, sort_mode=const.LOG_SORT_ASC, method='PUT')
示例#3
0
def test_errlog_raise():
    with pytest.raises(const.ArgError):
        client = Client(app_key, app_secret, base_url, lib='httplib')
        errLog = ErrorLog(client, index_name)
        errLog.call(1, 50, sort_mode=const.LOG_SORT_ASC, method='PUT')
def test_errlog_post():
    client = Client(app_key, app_secret, base_url, lib='httplib')
    errLog = ErrorLog(client, index_name)
    ret = errLog.call(1, 50, sort_mode=const.LOG_SORT_ASC, method=const.HTTP_POST)
    print(ret)
    assert ret['status'] == 'OK'
示例#5
0
def test_errlog():
    client = Client(app_key, app_secret, base_url, lib='httplib')
    errLog = ErrorLog(client, index_name)
    ret = errLog.call(1, 50, sort_mode=const.LOG_SORT_ASC)
    print(ret)
    assert ret['status'] == 'OK'
def test_errlog():
    client = Client(app_key, app_secret, base_url, lib="httplib")
    errLog = ErrorLog(client, index_name)
    ret = errLog.call(1, 50, sort_mode=const.LOG_SORT_ASC)
    print(ret)
    assert ret["status"] == "OK"
def test_proxy_errlog_post():
    client = Client(app_key, app_secret, base_url, lib=client_name, proxy=proxy)
    errLog = ErrorLog(client, index_name)
    ret = errLog.call(1, 50, sort_mode=const.LOG_SORT_ASC, method=const.HTTP_POST)
    print(ret)
    assert ret["status"] == "OK"
def test_errlog_post():
    client = Client(app_key, app_secret, base_url, lib=client_name, proxy=proxy)
    errLog = ErrorLog(client, index_name)
    ret = errLog.call(1, 50, sort_mode=const.LOG_SORT_ASC, method=const.HTTP_POST)
    print(ret)
    assert ret['status'] == 'OK'
def test_errlog():
    client = Client(app_key, app_secret, base_url, lib='httplib', proxy=proxy)
    errLog = ErrorLog(client, index_name)
    ret = errLog.call(1, 50, sort_mode=const.LOG_SORT_ASC)
    print(ret)
    assert ret['status'] == 'OK'