Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
nfcampos committed Oct 11, 2024
1 parent c9adf99 commit 0557fb0
Showing 1 changed file with 12 additions and 36 deletions.
48 changes: 12 additions & 36 deletions libs/langgraph/tests/test_remote_pregel.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ def test_get_graph():
],
}

remote_pregel = RemoteGraph(
sync_client=mock_sync_client, graph_id="test_graph_id"
)
remote_pregel = RemoteGraph(sync_client=mock_sync_client, graph_id="test_graph_id")

# call method / assertions
drawable_graph = remote_pregel.get_graph()
Expand Down Expand Up @@ -111,9 +109,7 @@ async def test_aget_graph():
],
}

remote_pregel = RemoteGraph(
client=mock_async_client, graph_id="test_graph_id"
)
remote_pregel = RemoteGraph(client=mock_async_client, graph_id="test_graph_id")

# call method / assertions
drawable_graph = await remote_pregel.aget_graph()
Expand Down Expand Up @@ -242,9 +238,7 @@ def test_get_state():
}

# call method / assertions
remote_pregel = RemoteGraph(
sync_client=mock_sync_client, graph_id="test_graph_id"
)
remote_pregel = RemoteGraph(sync_client=mock_sync_client, graph_id="test_graph_id")

config = {"configurable": {"thread_id": "thread1"}}
state_snapshot = remote_pregel.get_state(config)
Expand Down Expand Up @@ -291,9 +285,7 @@ async def test_aget_state():
}

# call method / assertions
remote_pregel = RemoteGraph(
client=mock_async_client, graph_id="test_graph_id"
)
remote_pregel = RemoteGraph(client=mock_async_client, graph_id="test_graph_id")

config = {"configurable": {"thread_id": "thread1"}}
state_snapshot = await remote_pregel.aget_state(config)
Expand Down Expand Up @@ -344,9 +336,7 @@ def test_get_state_history():
]

# call method / assertions
remote_pregel = RemoteGraph(
sync_client=mock_sync_client, graph_id="test_graph_id"
)
remote_pregel = RemoteGraph(sync_client=mock_sync_client, graph_id="test_graph_id")

config = {"configurable": {"thread_id": "thread1"}}
state_history_snapshot = list(
Expand Down Expand Up @@ -394,9 +384,7 @@ async def test_aget_state_history():
]

# call method / assertions
remote_pregel = RemoteGraph(
client=mock_async_client, graph_id="test_graph_id"
)
remote_pregel = RemoteGraph(client=mock_async_client, graph_id="test_graph_id")

config = {"configurable": {"thread_id": "thread1"}}
state_history_snapshot = []
Expand Down Expand Up @@ -437,9 +425,7 @@ def test_update_state():
}

# call method / assertions
remote_pregel = RemoteGraph(
sync_client=mock_sync_client, graph_id="test_graph_id"
)
remote_pregel = RemoteGraph(sync_client=mock_sync_client, graph_id="test_graph_id")

config = {"configurable": {"thread_id": "thread1"}}
response = remote_pregel.update_state(config, {"key": "value"})
Expand Down Expand Up @@ -468,9 +454,7 @@ async def test_aupdate_state():
}

# call method / assertions
remote_pregel = RemoteGraph(
client=mock_async_client, graph_id="test_graph_id"
)
remote_pregel = RemoteGraph(client=mock_async_client, graph_id="test_graph_id")

config = {"configurable": {"thread_id": "thread1"}}
response = await remote_pregel.aupdate_state(config, {"key": "value"})
Expand All @@ -495,9 +479,7 @@ def test_stream():
]

# call method / assertions
remote_pregel = RemoteGraph(
sync_client=mock_sync_client, graph_id="test_graph_id"
)
remote_pregel = RemoteGraph(sync_client=mock_sync_client, graph_id="test_graph_id")

config = {"configurable": {"thread_id": "thread_1"}}
result = list(remote_pregel.stream({"input": "data"}, config))
Expand All @@ -517,9 +499,7 @@ async def test_astream():
mock_async_client.runs.stream.return_value = async_iter

# call method / assertions
remote_pregel = RemoteGraph(
client=mock_async_client, graph_id="test_graph_id"
)
remote_pregel = RemoteGraph(client=mock_async_client, graph_id="test_graph_id")

config = {"configurable": {"thread_id": "thread_1"}}
chunks = []
Expand All @@ -536,9 +516,7 @@ def test_invoke():
}

# call method / assertions
remote_pregel = RemoteGraph(
sync_client=mock_sync_client, graph_id="test_graph_id"
)
remote_pregel = RemoteGraph(sync_client=mock_sync_client, graph_id="test_graph_id")

config = {"configurable": {"thread_id": "thread_1"}}
result = remote_pregel.invoke(
Expand All @@ -557,9 +535,7 @@ async def test_ainvoke():
}

# call method / assertions
remote_pregel = RemoteGraph(
client=mock_async_client, graph_id="test_graph_id"
)
remote_pregel = RemoteGraph(client=mock_async_client, graph_id="test_graph_id")

config = {"configurable": {"thread_id": "thread_1"}}
result = await remote_pregel.ainvoke(
Expand Down

0 comments on commit 0557fb0

Please sign in to comment.