diff --git a/integrations/github/tests/test_file_editor_tool.py b/integrations/github/tests/test_file_editor_tool.py index be1ed52ab5..936812142f 100644 --- a/integrations/github/tests/test_file_editor_tool.py +++ b/integrations/github/tests/test_file_editor_tool.py @@ -77,7 +77,7 @@ def test_to_dict_with_extra_params(self, monkeypatch): tool = GitHubFileEditorTool( outputs_to_string={"source": "result", "handler": message_handler}, inputs_from_state={"repo_state": "repo"}, - outputs_to_state={"file_content": {"source": "content", "handler": message_handler}}, + outputs_to_state={"file_content": {"source": "result", "handler": message_handler}}, ) tool_dict = tool.to_dict() @@ -88,7 +88,7 @@ def test_to_dict_with_extra_params(self, monkeypatch): assert tool_dict["data"]["inputs_from_state"] == {"repo_state": "repo"} assert tool_dict["data"]["outputs_to_state"] == { "file_content": { - "source": "content", + "source": "result", "handler": "haystack_integrations.tools.github.utils.message_handler", }, } @@ -113,7 +113,7 @@ def test_from_dict_with_extra_params(self, monkeypatch): "inputs_from_state": {"repo_state": "repo"}, "outputs_to_state": { "file_content": { - "source": "content", + "source": "result", "handler": "haystack_integrations.tools.github.utils.message_handler", }, }, @@ -124,7 +124,7 @@ def test_from_dict_with_extra_params(self, monkeypatch): assert tool.outputs_to_string["source"] == "result" assert tool.outputs_to_string["handler"] == message_handler assert tool.inputs_from_state == {"repo_state": "repo"} - assert tool.outputs_to_state["file_content"]["source"] == "content" + assert tool.outputs_to_state["file_content"]["source"] == "result" assert tool.outputs_to_state["file_content"]["handler"] == message_handler def test_pipeline_serialization(self, monkeypatch): diff --git a/integrations/github/tests/test_issue_commenter_tool.py b/integrations/github/tests/test_issue_commenter_tool.py index 2a4c19a4f7..b43872fdba 100644 --- a/integrations/github/tests/test_issue_commenter_tool.py +++ b/integrations/github/tests/test_issue_commenter_tool.py @@ -77,7 +77,7 @@ def test_to_dict_with_extra_params(self, monkeypatch): retry_attempts=3, outputs_to_string={"handler": message_handler}, inputs_from_state={"repository": "repo"}, - outputs_to_state={"documents": {"source": "docs", "handler": message_handler}}, + outputs_to_state={"documents": {"source": "success", "handler": message_handler}}, ) tool_dict = tool.to_dict() assert tool_dict["type"] == "haystack_integrations.tools.github.issue_commenter_tool.GitHubIssueCommenterTool" @@ -92,7 +92,7 @@ def test_to_dict_with_extra_params(self, monkeypatch): == "haystack_integrations.tools.github.utils.message_handler" ) assert tool_dict["data"]["inputs_from_state"] == {"repository": "repo"} - assert tool_dict["data"]["outputs_to_state"]["documents"]["source"] == "docs" + assert tool_dict["data"]["outputs_to_state"]["documents"]["source"] == "success" assert ( tool_dict["data"]["outputs_to_state"]["documents"]["handler"] == "haystack_integrations.tools.github.utils.message_handler" @@ -113,7 +113,7 @@ def test_from_dict_with_extra_params(self, monkeypatch): "inputs_from_state": {"repository": "repo"}, "outputs_to_state": { "documents": { - "source": "docs", + "source": "success", "handler": "haystack_integrations.tools.github.utils.message_handler", } }, @@ -128,5 +128,5 @@ def test_from_dict_with_extra_params(self, monkeypatch): assert tool.retry_attempts == 3 assert tool.outputs_to_string["handler"] == message_handler assert tool.inputs_from_state == {"repository": "repo"} - assert tool.outputs_to_state["documents"]["source"] == "docs" + assert tool.outputs_to_state["documents"]["source"] == "success" assert tool.outputs_to_state["documents"]["handler"] == message_handler diff --git a/integrations/github/tests/test_issue_viewer_tool.py b/integrations/github/tests/test_issue_viewer_tool.py index 8edb7b8a15..cd0e482bfb 100644 --- a/integrations/github/tests/test_issue_viewer_tool.py +++ b/integrations/github/tests/test_issue_viewer_tool.py @@ -73,7 +73,7 @@ def test_to_dict_with_extra_params(self, monkeypatch): retry_attempts=3, outputs_to_string={"handler": message_handler}, inputs_from_state={"repository": "repo"}, - outputs_to_state={"documents": {"source": "docs", "handler": message_handler}}, + outputs_to_state={"documents": {"source": "documents", "handler": message_handler}}, ) tool_dict = tool.to_dict() assert tool_dict["type"] == "haystack_integrations.tools.github.issue_viewer_tool.GitHubIssueViewerTool" @@ -88,7 +88,7 @@ def test_to_dict_with_extra_params(self, monkeypatch): == "haystack_integrations.tools.github.utils.message_handler" ) assert tool_dict["data"]["inputs_from_state"] == {"repository": "repo"} - assert tool_dict["data"]["outputs_to_state"]["documents"]["source"] == "docs" + assert tool_dict["data"]["outputs_to_state"]["documents"]["source"] == "documents" assert ( tool_dict["data"]["outputs_to_state"]["documents"]["handler"] == "haystack_integrations.tools.github.utils.message_handler" @@ -109,7 +109,7 @@ def test_from_dict_with_extra_params(self, monkeypatch): "inputs_from_state": {"repository": "repo"}, "outputs_to_state": { "documents": { - "source": "docs", + "source": "documents", "handler": "haystack_integrations.tools.github.utils.message_handler", } }, @@ -124,5 +124,5 @@ def test_from_dict_with_extra_params(self, monkeypatch): assert tool.retry_attempts == 3 assert tool.outputs_to_string["handler"] == message_handler assert tool.inputs_from_state == {"repository": "repo"} - assert tool.outputs_to_state["documents"]["source"] == "docs" + assert tool.outputs_to_state["documents"]["source"] == "documents" assert tool.outputs_to_state["documents"]["handler"] == message_handler diff --git a/integrations/github/tests/test_pr_creator_tool.py b/integrations/github/tests/test_pr_creator_tool.py index fd3e2d4499..d58354e368 100644 --- a/integrations/github/tests/test_pr_creator_tool.py +++ b/integrations/github/tests/test_pr_creator_tool.py @@ -74,7 +74,7 @@ def test_to_dict_with_extra_params(self, monkeypatch): raise_on_failure=False, outputs_to_string={"handler": message_handler}, inputs_from_state={"repository": "repo"}, - outputs_to_state={"documents": {"source": "docs", "handler": message_handler}}, + outputs_to_state={"documents": {"source": "result", "handler": message_handler}}, ) tool_dict = tool.to_dict() assert tool_dict["type"] == "haystack_integrations.tools.github.pr_creator_tool.GitHubPRCreatorTool" @@ -92,7 +92,7 @@ def test_to_dict_with_extra_params(self, monkeypatch): == "haystack_integrations.tools.github.utils.message_handler" ) assert tool_dict["data"]["inputs_from_state"] == {"repository": "repo"} - assert tool_dict["data"]["outputs_to_state"]["documents"]["source"] == "docs" + assert tool_dict["data"]["outputs_to_state"]["documents"]["source"] == "result" assert ( tool_dict["data"]["outputs_to_state"]["documents"]["handler"] == "haystack_integrations.tools.github.utils.message_handler" @@ -112,7 +112,7 @@ def test_from_dict_with_extra_params(self, monkeypatch): "inputs_from_state": {"repository": "repo"}, "outputs_to_state": { "documents": { - "source": "docs", + "source": "result", "handler": "haystack_integrations.tools.github.utils.message_handler", } }, @@ -126,5 +126,5 @@ def test_from_dict_with_extra_params(self, monkeypatch): assert tool.raise_on_failure is False assert tool.outputs_to_string["handler"] == message_handler assert tool.inputs_from_state == {"repository": "repo"} - assert tool.outputs_to_state["documents"]["source"] == "docs" + assert tool.outputs_to_state["documents"]["source"] == "result" assert tool.outputs_to_state["documents"]["handler"] == message_handler diff --git a/integrations/github/tests/test_repo_forker_tool.py b/integrations/github/tests/test_repo_forker_tool.py index 06f9859200..316ca7e918 100644 --- a/integrations/github/tests/test_repo_forker_tool.py +++ b/integrations/github/tests/test_repo_forker_tool.py @@ -70,9 +70,9 @@ def test_to_dict_with_extra_params(self, monkeypatch): tool = GitHubRepoForkerTool( github_token=Secret.from_env_var("GITHUB_TOKEN"), raise_on_failure=False, - outputs_to_string={"source": "docs", "handler": message_handler}, + outputs_to_string={"source": "repo", "handler": message_handler}, inputs_from_state={"repository": "repo"}, - outputs_to_state={"documents": {"source": "docs", "handler": message_handler}}, + outputs_to_state={"documents": {"source": "repo", "handler": message_handler}}, ) tool_dict = tool.to_dict() assert tool_dict["type"] == "haystack_integrations.tools.github.repo_forker_tool.GitHubRepoForkerTool" @@ -90,7 +90,7 @@ def test_to_dict_with_extra_params(self, monkeypatch): == "haystack_integrations.tools.github.utils.message_handler" ) assert tool_dict["data"]["inputs_from_state"] == {"repository": "repo"} - assert tool_dict["data"]["outputs_to_state"]["documents"]["source"] == "docs" + assert tool_dict["data"]["outputs_to_state"]["documents"]["source"] == "repo" assert ( tool_dict["data"]["outputs_to_state"]["documents"]["handler"] == "haystack_integrations.tools.github.utils.message_handler" @@ -110,7 +110,7 @@ def test_from_dict_with_extra_params(self, monkeypatch): "inputs_from_state": {"repository": "repo"}, "outputs_to_state": { "documents": { - "source": "docs", + "source": "repo", "handler": "haystack_integrations.tools.github.utils.message_handler", } }, @@ -124,5 +124,5 @@ def test_from_dict_with_extra_params(self, monkeypatch): assert tool.raise_on_failure is False assert tool.outputs_to_string["handler"] == message_handler assert tool.inputs_from_state == {"repository": "repo"} - assert tool.outputs_to_state["documents"]["source"] == "docs" + assert tool.outputs_to_state["documents"]["source"] == "repo" assert tool.outputs_to_state["documents"]["handler"] == message_handler diff --git a/integrations/github/tests/test_repo_viewer_tool.py b/integrations/github/tests/test_repo_viewer_tool.py index d83a7a68d3..a6e7a2dc71 100644 --- a/integrations/github/tests/test_repo_viewer_tool.py +++ b/integrations/github/tests/test_repo_viewer_tool.py @@ -83,7 +83,7 @@ def test_to_dict_with_extra_params(self, monkeypatch): tool = GitHubRepoViewerTool( outputs_to_string={"source": "result", "handler": message_handler}, inputs_from_state={"repo_state": "repo"}, - outputs_to_state={"file_content": {"source": "content", "handler": message_handler}}, + outputs_to_state={"file_content": {"source": "documents", "handler": message_handler}}, ) tool_dict = tool.to_dict() @@ -94,7 +94,7 @@ def test_to_dict_with_extra_params(self, monkeypatch): assert tool_dict["data"]["inputs_from_state"] == {"repo_state": "repo"} assert tool_dict["data"]["outputs_to_state"] == { "file_content": { - "source": "content", + "source": "documents", "handler": "haystack_integrations.tools.github.utils.message_handler", }, } @@ -120,7 +120,7 @@ def test_from_dict_with_extra_params(self, monkeypatch): "inputs_from_state": {"repo_state": "repo"}, "outputs_to_state": { "file_content": { - "source": "content", + "source": "documents", "handler": "haystack_integrations.tools.github.utils.message_handler", }, }, @@ -131,5 +131,5 @@ def test_from_dict_with_extra_params(self, monkeypatch): assert tool.outputs_to_string["source"] == "result" assert tool.outputs_to_string["handler"] == message_handler assert tool.inputs_from_state == {"repo_state": "repo"} - assert tool.outputs_to_state["file_content"]["source"] == "content" + assert tool.outputs_to_state["file_content"]["source"] == "documents" assert tool.outputs_to_state["file_content"]["handler"] == message_handler