fix: Resolve test isolation issues for o3-pro test
- Fixed test_fallback_with_shorthand_restrictions to clear restriction service singleton in finally block, preventing state leakage - Updated o3-pro test to use @patch.dict for OPENAI_ALLOWED_MODELS, following standard pattern and allowing both o3-pro and o3-pro-2025-06-10 - Removed invalid cassette file that had wrong request content The test now passes in both isolated and full suite runs. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -22,11 +22,10 @@ def inject_transport(monkeypatch, cassette_path: str):
|
||||
transport = inject_transport(monkeypatch, "path/to/cassette.json")
|
||||
"""
|
||||
# Ensure OpenAI provider is registered - always needed for transport injection
|
||||
import os
|
||||
from providers.base import ProviderType
|
||||
from providers.openai_provider import OpenAIModelProvider
|
||||
from providers.registry import ModelProviderRegistry
|
||||
|
||||
|
||||
# Always register OpenAI provider for transport tests (API key might be dummy)
|
||||
ModelProviderRegistry.register_provider(ProviderType.OPENAI, OpenAIModelProvider)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user