We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1bdd89 commit f6d99a2Copy full SHA for f6d99a2
tests/server/test_id_generator.py
@@ -34,9 +34,11 @@ def test_context_mutability(self):
34
assert context.task_id == "task_456"
35
36
def test_context_validation(self):
37
- """Test that context validates field types."""
38
- context = IDGeneratorContext(task_id="valid_string")
39
- assert isinstance(context.task_id, str)
+ """Test that context raises validation error for invalid types."""
+ from pydantic import ValidationError
+
40
+ with pytest.raises(ValidationError):
41
+ IDGeneratorContext(task_id={"not": "a string"})
42
43
44
class TestIDGenerator:
0 commit comments