Skip to content

Commit 41e409d

Browse files
fix openai-agents tests
1 parent fb348bb commit 41e409d

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tests/integrations/openai_agents/test_openai_agents.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ async def test_client_span_custom_model(
525525
traces_sample_rate=1.0,
526526
)
527527

528-
items = capture_items("transaction", "spans")
528+
items = capture_items("span")
529529

530530
result = await agents.Runner.run(
531531
agent, "Test input", run_config=test_run_config
@@ -1728,7 +1728,7 @@ async def test_error_handling(sentry_init, capture_items, test_agent):
17281728
traces_sample_rate=1.0,
17291729
)
17301730

1731-
items = capture_items("error", "span", "transaction")
1731+
items = capture_items("event", "span", "transaction")
17321732

17331733
with pytest.raises(Exception, match="Model Error"):
17341734
await agents.Runner.run(
@@ -1793,7 +1793,7 @@ async def test_error_captures_input_data(sentry_init, capture_items, test_agent)
17931793
send_default_pii=True,
17941794
)
17951795

1796-
items = capture_items("error", "span")
1796+
items = capture_items("event", "span")
17971797

17981798
with pytest.raises(InternalServerError, match="Error code: 500"):
17991799
await agents.Runner.run(agent, "Test input", run_config=test_run_config)
@@ -1851,7 +1851,7 @@ async def test_span_status_error(sentry_init, capture_items, test_agent):
18511851
assert spans[0]["status"] == "error"
18521852

18531853
(transaction,) = (item.payload for item in items if item.type == "transaction")
1854-
assert transaction["contexts"]["trace"]["status"] == "error"
1854+
assert transaction["contexts"]["trace"]["status"] == "internal_error"
18551855

18561856

18571857
@pytest.mark.asyncio
@@ -2102,7 +2102,7 @@ async def test_mcp_tool_execution_with_error(
21022102
assert mcp_tool_span["name"] == "execute_tool failing_mcp_tool"
21032103
assert mcp_tool_span["attributes"]["gen_ai.tool.name"] == "failing_mcp_tool"
21042104
assert mcp_tool_span["attributes"]["gen_ai.tool.input"] == '{"query": "test"}'
2105-
assert mcp_tool_span["attributes"]["gen_ai.tool.output"] is None
2105+
assert mcp_tool_span["attributes"]["gen_ai.tool.output"] == "None"
21062106

21072107
# Verify error status was set
21082108
assert mcp_tool_span["status"] == "error"

0 commit comments

Comments
 (0)