Exemplo n.º 1
0
def test_trigger_process_fail(client: ExtractTable):
    with pytest.raises(ServiceError):
        client.trigger_process(io.BytesIO())
Exemplo n.º 2
0
def test_get_result_fail(client: ExtractTable):
    with pytest.raises(ServiceError):
        assert client.get_result('')
Exemplo n.º 3
0
def test_check_usage(client: ExtractTable):
    assert isinstance(client.check_usage(), UsageStats)
Exemplo n.º 4
0
def test_process_file_index(client: ExtractTable):
    assert not (client.process_file(FILE_PATH, RESULTS_FOLDER, True))
Exemplo n.º 5
0
def client():
    return ExtractTable(API_KEY)
Exemplo n.º 6
0
def test_process_file_csv(client: ExtractTable, fmt="csv"):
    return all([os.path.exists(x) and x.endswith(fmt) for x in client.process_file(filepath=FILE_PATH, output_format=fmt)])
Exemplo n.º 7
0
def test_process_file(client: ExtractTable):
    assert isinstance(client.process_file(filepath=FILE_PATH, output_format="df"), list)