Skip to content

Commit 5a1cf56

Browse files
committed
test fix
1 parent 7776b56 commit 5a1cf56

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/unit/codegen/agents/test_agent.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def test_refresh_with_id(self, agent_task, mock_agents_api):
7777

7878
# Verify API was called with correct params
7979
mock_agents_api.get_agent_run_v1_organizations_org_id_agent_run_agent_run_id_get.assert_called_once_with(
80-
agent_run_id="123", # Use string ID as stored in agent_task.id
80+
agent_run_id=123, # Use string ID as stored in agent_task.id
8181
org_id=42,
8282
authorization="Bearer test-token"
8383
)
@@ -220,7 +220,7 @@ class TestAgentIntegration:
220220
def mock_response(self):
221221
"""Create a mock response for API calls"""
222222
mock_response = MagicMock() # Remove spec=AgentRunResponse
223-
mock_response.id = "987"
223+
mock_response.id = 987
224224
mock_response.status = "running"
225225
mock_response.result = None
226226
mock_response.web_url = "https://example.com/run/987"
@@ -230,7 +230,7 @@ def mock_response(self):
230230
def mock_updated_response(self):
231231
"""Create a mock updated response for API calls"""
232232
mock_updated = {
233-
"id": "987",
233+
"id": 987,
234234
"status": "completed",
235235
"result": {"output": "Task completed successfully"},
236236
"web_url": "https://example.com/run/987"
@@ -266,7 +266,7 @@ def test_full_workflow(self, mock_response, mock_updated_response):
266266
job = agent.run("Execute this instruction")
267267

268268
# Verify job properties
269-
assert job.id == "987"
269+
assert job.id == 987
270270
assert job.status == "running"
271271
assert job.result is None
272272

@@ -275,14 +275,14 @@ def test_full_workflow(self, mock_response, mock_updated_response):
275275

276276
# Verify API calls
277277
mock_agents_api.get_agent_run_v1_organizations_org_id_agent_run_agent_run_id_get.assert_called_once_with(
278-
agent_run_id="987", # Use string ID
278+
agent_run_id=987,
279279
org_id=123,
280280
authorization="Bearer test-token"
281281
)
282282

283283
# Verify status
284284
assert isinstance(status, dict)
285-
assert status["id"] == "987"
285+
assert status["id"] == 987
286286
assert status["status"] == "completed"
287287
assert status["result"] == {"output": "Task completed successfully"}
288288
assert status["web_url"] == "https://example.com/run/987"

0 commit comments

Comments
 (0)