Skip to content

Commit f0be8d3

Browse files
committed
Fix unit tests
1 parent 1017c72 commit f0be8d3

4 files changed

Lines changed: 16 additions & 16 deletions

File tree

integrations/github/tests/test_issue_commenter_tool.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def test_to_dict_with_extra_params(self, monkeypatch):
7676
raise_on_failure=False,
7777
retry_attempts=3,
7878
outputs_to_string={"handler": message_handler},
79-
inputs_from_state={"repository": "repo"},
79+
inputs_from_state={"repository": "url"},
8080
outputs_to_state={"documents": {"source": "success", "handler": message_handler}},
8181
)
8282
tool_dict = tool.to_dict()
@@ -91,7 +91,7 @@ def test_to_dict_with_extra_params(self, monkeypatch):
9191
tool_dict["data"]["outputs_to_string"]["handler"]
9292
== "haystack_integrations.tools.github.utils.message_handler"
9393
)
94-
assert tool_dict["data"]["inputs_from_state"] == {"repository": "repo"}
94+
assert tool_dict["data"]["inputs_from_state"] == {"repository": "url"}
9595
assert tool_dict["data"]["outputs_to_state"]["documents"]["source"] == "success"
9696
assert (
9797
tool_dict["data"]["outputs_to_state"]["documents"]["handler"]
@@ -110,7 +110,7 @@ def test_from_dict_with_extra_params(self, monkeypatch):
110110
"raise_on_failure": False,
111111
"retry_attempts": 3,
112112
"outputs_to_string": {"handler": "haystack_integrations.tools.github.utils.message_handler"},
113-
"inputs_from_state": {"repository": "repo"},
113+
"inputs_from_state": {"repository": "url"},
114114
"outputs_to_state": {
115115
"documents": {
116116
"source": "success",
@@ -127,6 +127,6 @@ def test_from_dict_with_extra_params(self, monkeypatch):
127127
assert tool.raise_on_failure is False
128128
assert tool.retry_attempts == 3
129129
assert tool.outputs_to_string["handler"] == message_handler
130-
assert tool.inputs_from_state == {"repository": "repo"}
130+
assert tool.inputs_from_state == {"repository": "url"}
131131
assert tool.outputs_to_state["documents"]["source"] == "success"
132132
assert tool.outputs_to_state["documents"]["handler"] == message_handler

integrations/github/tests/test_issue_viewer_tool.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def test_to_dict_with_extra_params(self, monkeypatch):
7272
raise_on_failure=False,
7373
retry_attempts=3,
7474
outputs_to_string={"handler": message_handler},
75-
inputs_from_state={"repository": "repo"},
75+
inputs_from_state={"repository": "url"},
7676
outputs_to_state={"documents": {"source": "documents", "handler": message_handler}},
7777
)
7878
tool_dict = tool.to_dict()
@@ -87,7 +87,7 @@ def test_to_dict_with_extra_params(self, monkeypatch):
8787
tool_dict["data"]["outputs_to_string"]["handler"]
8888
== "haystack_integrations.tools.github.utils.message_handler"
8989
)
90-
assert tool_dict["data"]["inputs_from_state"] == {"repository": "repo"}
90+
assert tool_dict["data"]["inputs_from_state"] == {"repository": "url"}
9191
assert tool_dict["data"]["outputs_to_state"]["documents"]["source"] == "documents"
9292
assert (
9393
tool_dict["data"]["outputs_to_state"]["documents"]["handler"]
@@ -106,7 +106,7 @@ def test_from_dict_with_extra_params(self, monkeypatch):
106106
"raise_on_failure": False,
107107
"retry_attempts": 3,
108108
"outputs_to_string": {"handler": "haystack_integrations.tools.github.utils.message_handler"},
109-
"inputs_from_state": {"repository": "repo"},
109+
"inputs_from_state": {"repository": "url"},
110110
"outputs_to_state": {
111111
"documents": {
112112
"source": "documents",
@@ -123,6 +123,6 @@ def test_from_dict_with_extra_params(self, monkeypatch):
123123
assert tool.raise_on_failure is False
124124
assert tool.retry_attempts == 3
125125
assert tool.outputs_to_string["handler"] == message_handler
126-
assert tool.inputs_from_state == {"repository": "repo"}
126+
assert tool.inputs_from_state == {"repository": "url"}
127127
assert tool.outputs_to_state["documents"]["source"] == "documents"
128128
assert tool.outputs_to_state["documents"]["handler"] == message_handler

integrations/github/tests/test_pr_creator_tool.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def test_to_dict_with_extra_params(self, monkeypatch):
7373
github_token=Secret.from_env_var("GITHUB_TOKEN"),
7474
raise_on_failure=False,
7575
outputs_to_string={"handler": message_handler},
76-
inputs_from_state={"repository": "repo"},
76+
inputs_from_state={"repository": "issue_url"},
7777
outputs_to_state={"documents": {"source": "result", "handler": message_handler}},
7878
)
7979
tool_dict = tool.to_dict()
@@ -91,7 +91,7 @@ def test_to_dict_with_extra_params(self, monkeypatch):
9191
tool_dict["data"]["outputs_to_string"]["handler"]
9292
== "haystack_integrations.tools.github.utils.message_handler"
9393
)
94-
assert tool_dict["data"]["inputs_from_state"] == {"repository": "repo"}
94+
assert tool_dict["data"]["inputs_from_state"] == {"repository": "issue_url"}
9595
assert tool_dict["data"]["outputs_to_state"]["documents"]["source"] == "result"
9696
assert (
9797
tool_dict["data"]["outputs_to_state"]["documents"]["handler"]
@@ -109,7 +109,7 @@ def test_from_dict_with_extra_params(self, monkeypatch):
109109
"github_token": {"env_vars": ["GITHUB_TOKEN"], "strict": True, "type": "env_var"},
110110
"raise_on_failure": False,
111111
"outputs_to_string": {"handler": "haystack_integrations.tools.github.utils.message_handler"},
112-
"inputs_from_state": {"repository": "repo"},
112+
"inputs_from_state": {"repository": "issue_url"},
113113
"outputs_to_state": {
114114
"documents": {
115115
"source": "result",
@@ -125,6 +125,6 @@ def test_from_dict_with_extra_params(self, monkeypatch):
125125
assert tool.github_token == Secret.from_env_var("GITHUB_TOKEN")
126126
assert tool.raise_on_failure is False
127127
assert tool.outputs_to_string["handler"] == message_handler
128-
assert tool.inputs_from_state == {"repository": "repo"}
128+
assert tool.inputs_from_state == {"repository": "issue_url"}
129129
assert tool.outputs_to_state["documents"]["source"] == "result"
130130
assert tool.outputs_to_state["documents"]["handler"] == message_handler

integrations/github/tests/test_repo_forker_tool.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def test_to_dict_with_extra_params(self, monkeypatch):
7171
github_token=Secret.from_env_var("GITHUB_TOKEN"),
7272
raise_on_failure=False,
7373
outputs_to_string={"source": "repo", "handler": message_handler},
74-
inputs_from_state={"repository": "repo"},
74+
inputs_from_state={"repository": "url"},
7575
outputs_to_state={"documents": {"source": "repo", "handler": message_handler}},
7676
)
7777
tool_dict = tool.to_dict()
@@ -89,7 +89,7 @@ def test_to_dict_with_extra_params(self, monkeypatch):
8989
tool_dict["data"]["outputs_to_string"]["handler"]
9090
== "haystack_integrations.tools.github.utils.message_handler"
9191
)
92-
assert tool_dict["data"]["inputs_from_state"] == {"repository": "repo"}
92+
assert tool_dict["data"]["inputs_from_state"] == {"repository": "url"}
9393
assert tool_dict["data"]["outputs_to_state"]["documents"]["source"] == "repo"
9494
assert (
9595
tool_dict["data"]["outputs_to_state"]["documents"]["handler"]
@@ -107,7 +107,7 @@ def test_from_dict_with_extra_params(self, monkeypatch):
107107
"github_token": {"env_vars": ["GITHUB_TOKEN"], "strict": True, "type": "env_var"},
108108
"raise_on_failure": False,
109109
"outputs_to_string": {"handler": "haystack_integrations.tools.github.utils.message_handler"},
110-
"inputs_from_state": {"repository": "repo"},
110+
"inputs_from_state": {"repository": "url"},
111111
"outputs_to_state": {
112112
"documents": {
113113
"source": "repo",
@@ -123,6 +123,6 @@ def test_from_dict_with_extra_params(self, monkeypatch):
123123
assert tool.github_token == Secret.from_env_var("GITHUB_TOKEN")
124124
assert tool.raise_on_failure is False
125125
assert tool.outputs_to_string["handler"] == message_handler
126-
assert tool.inputs_from_state == {"repository": "repo"}
126+
assert tool.inputs_from_state == {"repository": "url"}
127127
assert tool.outputs_to_state["documents"]["source"] == "repo"
128128
assert tool.outputs_to_state["documents"]["handler"] == message_handler

0 commit comments

Comments
 (0)