mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-07 02:07:52 +02:00
test: Add tests for before and limit parameters for list SqliteSaver (#5816)
**Description:** Add test for before and limit parameters for the list in SqliteSaver which was marked as TODO. --------- Co-authored-by: Caspar Broekhuizen <caspar@langchain.dev>
This commit is contained in:
co-authored by
Caspar Broekhuizen
parent
f0fced262a
commit
eeb731c07e
@@ -116,7 +116,17 @@ class TestSqliteSaver:
|
||||
search_results_5[1].config["configurable"]["checkpoint_ns"],
|
||||
} == {"", "inner"}
|
||||
|
||||
# TODO: test before and limit params
|
||||
# search with before param
|
||||
search_results_6 = list(saver.list(None, before=search_results_5[1].config))
|
||||
assert len(search_results_6) == 1
|
||||
assert search_results_6[0].config["configurable"]["thread_id"] == "thread-1"
|
||||
|
||||
# search with limit param
|
||||
search_results_7 = list(
|
||||
saver.list({"configurable": {"thread_id": "thread-2"}}, limit=1)
|
||||
)
|
||||
assert len(search_results_7) == 1
|
||||
assert search_results_7[0].config["configurable"]["thread_id"] == "thread-2"
|
||||
|
||||
def test_search_where(self) -> None:
|
||||
# call method / assertions
|
||||
|
||||
Reference in New Issue
Block a user