Skip to content

Commit

Permalink
Removes the test_cypher_save_load test from the GraphCypherQAChain in…
Browse files Browse the repository at this point in the history
…tegration tests
  • Loading branch information
alexthomas93 committed Nov 29, 2024
1 parent 0889744 commit cd4a76b
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions libs/neo4j/tests/integration_tests/chains/test_graph_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,37 +222,6 @@ def test_cypher_return_direct() -> None:
assert output == expected_output


@pytest.mark.skip(reason="load_chain is failing and is due to be deprecated")
def test_cypher_save_load() -> None:
"""Test saving and loading."""

FILE_PATH = "cypher.yaml"
url = os.environ.get("NEO4J_URI")
username = os.environ.get("NEO4J_USERNAME")
password = os.environ.get("NEO4J_PASSWORD")
assert url is not None
assert username is not None
assert password is not None

graph = Neo4jGraph(
url=url,
username=username,
password=password,
)
llm = MagicMock(spec=BaseLanguageModel)
chain = GraphCypherQAChain.from_llm(
llm=llm,
graph=graph,
return_direct=True,
allow_dangerous_requests=True,
)

chain.save(file_path=FILE_PATH)
qa_loaded = load_chain(FILE_PATH, graph=graph)

assert qa_loaded == chain


def test_exclude_types() -> None:
"""Test exclude types from schema."""
url = os.environ.get("NEO4J_URI", "bolt://localhost:7687")
Expand Down

0 comments on commit cd4a76b

Please sign in to comment.