Skip to content

Commit bb75cc6

Browse files
committed
fix: update test to expect ValidationError instead of ValueError
Pydantic v2 raises ValidationError for validation failures, not ValueError. Updated test expectation and import to match actual behavior.
1 parent c847fcc commit bb75cc6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/unit/agents/test_turnkey.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from unittest.mock import AsyncMock, MagicMock
44

55
import pytest
6+
from pydantic import ValidationError
67

78
from flare_ai_kit.agents.turnkey import (
89
AgentTransaction,
@@ -124,7 +125,7 @@ def test_confidence_score_validation(self):
124125
assert transaction.confidence_score == 0.75
125126

126127
# Invalid confidence scores should raise validation error
127-
with pytest.raises(ValueError, match="Confidence score must be"):
128+
with pytest.raises(ValidationError, match="less than or equal to 1"):
128129
AgentTransaction(
129130
agent_id="test_agent",
130131
transaction_request=TransactionRequest(

0 commit comments

Comments
 (0)