def test_create(): client = Client(app_key, app_secret, base_url, lib=client_name) indexApp = IndexApp(client) ret = indexApp.create(index_name, 'tpl_test') print(ret) assert ret['status'] == 'OK' time.sleep(2)
def test_create(): client = Client(app_key, app_secret, base_url) indexApp = IndexApp(client) ret = yield from indexApp.create(index_name, 'tpl_test') client.session.close() assert ret['status'] == 'OK' time.sleep(5)
def test_get_all_page(): client = Client(app_key, app_secret, base_url, lib=client_name) indexApp = IndexApp(client) ret = indexApp.getAll(page=1, size=50) print(ret) assert ret['status'] == 'OK' print(ret['result'])
def test_status(): client = Client(app_key, app_secret, base_url) indexApp = IndexApp(client) ret = yield from indexApp.status(index_name) client.session.close() assert ret['status'] == 'OK' print(ret['result'])
def test_app_delete(): client = Client(app_key, app_secret, base_url) indexApp = IndexApp(client) ret = yield from indexApp.delete(index_name) client.session.close() assert ret['status'] == 'OK'
def test_rebuild(): client = Client(app_key, app_secret, base_url, lib=client_name) indexApp = IndexApp(client) ret = indexApp.rebuild(index_name, 'createtask', table_name=table_name) print(ret) assert ret['status'] == 'OK'
def test_app_delete(): client = Client(app_key, app_secret, base_url, lib=client_name) indexApp = IndexApp(client) ret = indexApp.delete(index_name) assert ret['status'] == 'OK'
def test_delete(): client = Client(app_key, app_secret, base_url, lib=client_name) indexApp = IndexApp(client) ret = indexApp.delete(index_name) assert ret['status'] == 'OK'
def test_status(): client = Client(app_key, app_secret, base_url, lib=client_name) indexApp = IndexApp(client) ret = indexApp.status(index_name) assert ret['status'] == 'OK' print(ret['result'])