Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions integrations/github/tests/test_file_editor_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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",
},
}
Expand All @@ -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",
},
},
Expand All @@ -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):
Expand Down
8 changes: 4 additions & 4 deletions integrations/github/tests/test_issue_commenter_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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",
}
},
Expand All @@ -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
8 changes: 4 additions & 4 deletions integrations/github/tests/test_issue_viewer_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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",
}
},
Expand All @@ -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
8 changes: 4 additions & 4 deletions integrations/github/tests/test_pr_creator_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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",
}
},
Expand All @@ -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
10 changes: 5 additions & 5 deletions integrations/github/tests/test_repo_forker_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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",
}
},
Expand All @@ -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
8 changes: 4 additions & 4 deletions integrations/github/tests/test_repo_viewer_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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",
},
}
Expand All @@ -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",
},
},
Expand All @@ -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