haystack/test/document_stores/test_graphdb.py
Silvano Cerza 5b63c2086e
refactor: Deprecate BaseKnowledgeGraph, GraphDBKnowledgeGraph, InMemoryKnowledgeGraph and Text2SparqlRetriever (#4500)
* Deprecate BaseKnowledgeGraph and InMemoryKnowledgeGraph

* Deprecate GraphDBKnowledgeGraph

* Fix mypy

* Deprecate Text2SparqlRetriever
2023-03-27 15:31:22 +02:00

23 lines
661 B
Python

import pytest
from haystack.document_stores.graphdb import GraphDBKnowledgeGraph
from ..conftest import fail_at_version
@pytest.mark.unit
@fail_at_version(1, 17)
def test_graphdb_knowledge_graph_deprecation_warning():
with pytest.warns(DeprecationWarning) as w:
GraphDBKnowledgeGraph()
assert len(w) == 2
assert (
w[0].message.args[0]
== "The GraphDBKnowledgeGraph component is deprecated and will be removed in future versions."
)
assert (
w[1].message.args[0]
== "The BaseKnowledgeGraph component is deprecated and will be removed in future versions."
)