Beispiel #1
0
def test_trigger_process_fail(client: ExtractTable):
    with pytest.raises(ServiceError):
        client.trigger_process(io.BytesIO())
Beispiel #2
0
def test_get_result_fail(client: ExtractTable):
    with pytest.raises(ServiceError):
        assert client.get_result('')
Beispiel #3
0
def test_check_usage(client: ExtractTable):
    assert isinstance(client.check_usage(), UsageStats)
Beispiel #4
0
def test_process_file_index(client: ExtractTable):
    assert not (client.process_file(FILE_PATH, RESULTS_FOLDER, True))
Beispiel #5
0
def client():
    return ExtractTable(API_KEY)
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)])
def test_process_file(client: ExtractTable):
    assert isinstance(client.process_file(filepath=FILE_PATH, output_format="df"), list)