Adds Test to SchemaConverter.build Schema Validation

This commit is contained in:
2025-06-03 02:35:25 -03:00
parent 66ca341bb2
commit 782e09d5e3

View File

@@ -11,6 +11,20 @@ def is_pydantic_model(cls):
class TestSchemaConverter(TestCase): class TestSchemaConverter(TestCase):
def test_invalid_schema(self):
schema = {
"title": 1,
"description": "A person",
"type": "object",
"properties": {
"name": {"type": "string"},
"age": {"type": "integer"},
},
}
with self.assertRaises(ValueError):
SchemaConverter.build(schema)
def test_build_expects_title(self): def test_build_expects_title(self):
schema = { schema = {
"description": "A person", "description": "A person",