Skip to content

Commit 2bcdfa3

Browse files
authored
chore(langchain-sdk): Match error message while testing tool invocation failure modes. (#141)
1 parent ea20e2a commit 2bcdfa3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,9 @@ async def test_generate_tool(
746746
await tool.coroutine(param1="test_value")
747747
mock_invoke_tool.assert_called_once()
748748
else:
749-
with pytest.raises(PermissionError):
749+
with pytest.raises(
750+
PermissionError, match="Login required before invoking tool_name."
751+
):
750752
await tool.coroutine(param1="test_value")
751753
mock_invoke_tool.assert_not_called()
752754

0 commit comments

Comments
 (0)