This commit is contained in:
Swapna Lekkala 2025-10-10 09:16:15 -07:00
parent e09401805f
commit b5c951fa4b
10 changed files with 40 additions and 178 deletions

View file

@ -1084,11 +1084,6 @@ async def test_create_openai_response_with_invalid_text_format(openai_responses_
)
# ============================================================================
# Shield Validation Tests
# ============================================================================
async def test_check_input_safety_no_violation(openai_responses_impl):
"""Test input shield validation with no violations."""
messages = [UserMessage(content="Hello world")]

View file

@ -44,11 +44,6 @@ def responses_impl(mock_apis):
return OpenAIResponsesImpl(**mock_apis)
# ============================================================================
# Shield ID Extraction Tests
# ============================================================================
def test_extract_shield_ids_from_strings(responses_impl):
"""Test extraction from simple string shield IDs."""
shields = ["llama-guard", "content-filter", "nsfw-detector"]
@ -99,11 +94,6 @@ def test_extract_shield_ids_unknown_format(responses_impl, caplog):
assert "Unknown shield format" in caplog.text
# ============================================================================
# Text Content Extraction Tests
# ============================================================================
def test_extract_text_content_string(responses_impl):
"""Test extraction from simple string content."""
content = "Hello world"
@ -177,11 +167,6 @@ def test_extract_text_content_none_input(responses_impl):
assert result is None
# ============================================================================
# Message Conversion Tests
# ============================================================================
def test_convert_user_message(responses_impl):
"""Test conversion of user message."""
openai_msg = MagicMock(role="user", content="Hello world")