Skip to content

test(anthropic): Stop mocking response iterator#5573

Draft
alexander-alderman-webb wants to merge 3 commits intomasterfrom
webb/anthropic/remove-mocks
Draft

test(anthropic): Stop mocking response iterator#5573
alexander-alderman-webb wants to merge 3 commits intomasterfrom
webb/anthropic/remove-mocks

Conversation

@alexander-alderman-webb
Copy link
Contributor

Description

Issues

Reminders

@github-actions
Copy link
Contributor

github-actions bot commented Mar 10, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (crons) Add owner field to MonitorConfig by julwhitney13 in #5610
  • (pydantic-ai) Add tool description to execute_tool spans by ericapisani in #5596

Bug Fixes 🐛

  • (celery) Propagate user-set headers by sentrivana in #5581
  • (utils) Avoid double serialization of strings in safe_serialize by ericapisani in #5587

Documentation 📚

  • (openai-agents) Remove inapplicable comment by alexander-alderman-webb in #5495
  • Add AGENTS.md by sentrivana in #5579
  • Add set_attribute example to changelog by sentrivana in #5578

Internal Changes 🔧

Openai Agents

  • Do not fail on new tool fields by alexander-alderman-webb in #5625
  • Stop expecting a specific function name by alexander-alderman-webb in #5623
  • Set streaming header when library uses with_streaming_response() by alexander-alderman-webb in #5583
  • Replace mocks with httpx for streamed responses by alexander-alderman-webb in #5580
  • Replace mocks with httpx in non-MCP tool tests by alexander-alderman-webb in #5602
  • Replace mocks with httpx in MCP tool tests by alexander-alderman-webb in #5605
  • Replace mocks with httpx in handoff tests by alexander-alderman-webb in #5604
  • Replace mocks with httpx in API error test by alexander-alderman-webb in #5601
  • Replace mocks with httpx in non-error single-response tests by alexander-alderman-webb in #5600
  • Remove test for unreachable state by alexander-alderman-webb in #5584
  • Expect namespace tool field for new openai versions by alexander-alderman-webb in #5599

Other

  • (anthropic) Stop mocking response iterator by alexander-alderman-webb in #5573
  • (httpx) Resolve type checking failures by alexander-alderman-webb in #5626
  • (pyramid) Support alpha suffixes in version parsing by alexander-alderman-webb in #5618
  • Normalize dots in package names in populate_tox.py by alexander-alderman-webb in #5574
  • Do not run actions on potel-base by sentrivana in #5614

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 10, 2026

Codecov Results 📊

13 passed | Total: 13 | Pass Rate: 100% | Execution Time: 8.36s

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 13949 uncovered lines.


Generated by Codecov Action

capture_events,
send_default_pii,
include_prompts,
server_side_event_chunks,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing pytest fixture 'server_side_event_chunks' will cause test failure

The test function test_streaming_create_message declares server_side_event_chunks as a fixture parameter, but this fixture is not defined anywhere in the codebase. The only definition of server_side_event_chunks is a plain generator function in tests/integrations/openai_agents/test_openai_agents.py, which is not a pytest fixture and is not accessible from the anthropic tests. This will cause pytest to raise a fixture 'server_side_event_chunks' not found error at test collection time.

Verification

Searched for 'server_side_event_chunks' definition across all files in tests/conftest.py, tests/integrations/conftest.py, and all *.py files. Found it only defined as a plain function (not a @pytest.fixture) in tests/integrations/openai_agents/test_openai_agents.py at line 1389. Verified the function is used as a parameter in test_streaming_create_message at line 224, which pytest interprets as a fixture request.

Also found at 1 additional location
  • tests/integrations/anthropic/test_anthropic.py:1316-1316

Identified by Warden code-review · XQD-K8S

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant