Problem
-
src/praisonai/tests/unit/integrations/test_managed_agents.py (197 LOC, 10 tests) is 100 % stale. Every test either:
patch('praisonai.integrations.managed_agents.aiohttp', None) — aiohttp is not imported in the current module (it uses anthropic);
assert managed.cli_command == "managed-anthropic" — attribute removed;
- calls
ManagedAgentIntegration(provider="anthropic", api_key="...") with positional-ish kwargs that no longer match the current ctor.
Under the default pytest tier the file is gated-skipped → CI is green while the tests would error if the gate were off.
-
Zero real agentic tests for managed agents. No test constructs Agent(name=..., backend=ManagedAgent(...)).start("real prompt") and asserts an LLM reply. Every existing test mocks the SDK.
Evidence:
pytest src/praisonai/tests/unit/integrations/test_managed_agents.py -v → "10 skipped" on main.
grep -n "agent.start" src/praisonai-agents/tests/managed/ → no results for a real prompt.
Acceptance criteria
Implementation plan
- Delete/rewrite
tests/unit/integrations/test_managed_agents.py in-place.
- Add
tests/integration/test_managed_real.py with pytest.importorskip("anthropic") / pytest.importorskip("litellm") guards and os.environ.get("RUN_REAL_AGENTIC") gate.
- Update
_pytest_plugins/test_gating.py matrix so the new integration marker is visible under tier extended or nightly.
- README for the integration dir.
Files
Modify:
src/praisonai/tests/unit/integrations/test_managed_agents.py (full rewrite).
src/praisonai/tests/_pytest_plugins/test_gating.py (only if a new marker is needed).
Create:
src/praisonai/tests/integration/__init__.py
src/praisonai/tests/integration/test_managed_real.py
src/praisonai/tests/integration/README.md
Invariants
- No change to core SDK.
- Backward-compatible (only adds + rewrites tests).
References
cc @claude — per .windsurf/workflows/e2e-analysis-issue-pr-merge.md.
Problem
src/praisonai/tests/unit/integrations/test_managed_agents.py(197 LOC, 10 tests) is 100 % stale. Every test either:patch('praisonai.integrations.managed_agents.aiohttp', None)—aiohttpis not imported in the current module (it usesanthropic);assert managed.cli_command == "managed-anthropic"— attribute removed;ManagedAgentIntegration(provider="anthropic", api_key="...")with positional-ish kwargs that no longer match the current ctor.Under the default pytest tier the file is gated-skipped → CI is green while the tests would error if the gate were off.
Zero real agentic tests for managed agents. No test constructs
Agent(name=..., backend=ManagedAgent(...)).start("real prompt")and asserts an LLM reply. Every existing test mocks the SDK.Evidence:
pytest src/praisonai/tests/unit/integrations/test_managed_agents.py -v→ "10 skipped" onmain.grep -n "agent.start" src/praisonai-agents/tests/managed/→ no results for a real prompt.Acceptance criteria
test_managed_agents.pyrewritten against current surface:aiohttp/cli_commandreferences;ManagedConfigdefaults,map_managed_tools, factory routing (env-based + explicit), structural subtyping of both backends toManagedBackendProtocol.src/praisonai/tests/integration/test_managed_real.py(marker@pytest.mark.integration, guarded byRUN_REAL_AGENTIC=1+ respective API-key env var):test_anthropic_managed_real— usesclaude-haiku-4-5, asserts non-empty result +total_input_tokens > 0+ non-emptysession_id;test_local_managed_real_openai— usesgpt-4o-mini, same assertions;test_multi_turn_preserves_session— two calls keep same session id;src/praisonai/tests/integration/README.mdexplaining how to run the real agentic suite locally.Implementation plan
tests/unit/integrations/test_managed_agents.pyin-place.tests/integration/test_managed_real.pywithpytest.importorskip("anthropic")/pytest.importorskip("litellm")guards andos.environ.get("RUN_REAL_AGENTIC")gate._pytest_plugins/test_gating.pymatrix so the newintegrationmarker is visible under tierextendedornightly.Files
Modify:
src/praisonai/tests/unit/integrations/test_managed_agents.py(full rewrite).src/praisonai/tests/_pytest_plugins/test_gating.py(only if a new marker is needed).Create:
src/praisonai/tests/integration/__init__.pysrc/praisonai/tests/integration/test_managed_real.pysrc/praisonai/tests/integration/README.mdInvariants
References
.windsurf/workflows/e2e-analysis-issue-pr-merge.mdPhase 7a.cc @claude — per
.windsurf/workflows/e2e-analysis-issue-pr-merge.md.