Beispiel #1
0
def test_extract_clients_no_file():
    index_ts_path = pathlib.Path(FIXTURES / "node_templates" /
                                 "index_samples" / "no_exist_index.ts")

    with pytest.raises(FileNotFoundError):
        clients = node.extract_clients(index_ts_path)
        assert not clients
Beispiel #2
0
def test_extract_single_clients():
    index_ts_path = pathlib.Path(FIXTURES / "node_templates" /
                                 "index_samples" / "single_index.ts")

    clients = node.extract_clients(index_ts_path)

    assert len(clients) == 1
    assert clients[0] == "TextToSpeechClient"
Beispiel #3
0
def test_extract_multiple_clients():
    index_ts_path = pathlib.Path(FIXTURES / "node_templates" /
                                 "index_samples" / "multiple_index.ts")

    clients = node.extract_clients(index_ts_path)

    assert len(clients) == 2
    assert clients[0] == "StreamingVideoIntelligenceServiceClient"
    assert clients[1] == "VideoIntelligenceServiceClient"