Beispiel #1
0
def test_get_tuple_returns_size_three_list():
    graph_parser.parse('tests/assets/paper.nt')
    graph_parser.persist_index()
    t = index_parser.get_tuple('nod1', ['nod1', 'nod2'])
    assert isinstance(t, list)
    assert 3 == len(t)
Beispiel #2
0
def test_get_tuple_tries_to_get_template_index(monkeypatch):
    counters = mock_method_with_counter(monkeypatch, db, 'get_template_index')

    index_parser.get_tuple('nod1', ['nod1', 'nod2'])
    assert 1 == counters['invocations']