fix(tests): stabilize escalation SSE backend tests
Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
@@ -9,6 +9,26 @@ from app.models.user import User
|
||||
from app.services.handoff_manager import HandoffManager
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def stub_ai_assessment():
|
||||
"""Keep handoff tests focused on handoff behavior, not external AI calls."""
|
||||
with patch.object(
|
||||
HandoffManager,
|
||||
"_generate_ai_assessment",
|
||||
new=AsyncMock(
|
||||
return_value=(
|
||||
"Stub escalation assessment",
|
||||
{
|
||||
"likely_cause": "Stub",
|
||||
"suggested_steps": [],
|
||||
"confidence": "medium",
|
||||
},
|
||||
)
|
||||
),
|
||||
):
|
||||
yield
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_create_park_handoff(client: AsyncClient, test_user, auth_headers, test_db):
|
||||
"""Parking a session creates a handoff with snapshot."""
|
||||
|
||||
Reference in New Issue
Block a user