🐛 fix(test_graph.py): add assertion to check if root node is not None

The test_build_params function was failing when the root node was None. This commit adds an assertion to check if the root node is not None before proceeding with the other assertions.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-23 10:44:23 -03:00
commit a0f48b1d12

View file

@ -238,6 +238,7 @@ def test_build_params(basic_graph):
root = get_root_node(basic_graph)
# Root node is a TimeTravelGuideChain
# which requires an llm and memory
assert root is not None
assert isinstance(root.params, dict)
assert "llm" in root.params
assert "memory" in root.params