Update tests

This commit is contained in:
Cyber MacGeddon 2025-09-04 15:44:34 +01:00
parent 9d95e5758b
commit e50c6f8dda

View file

@ -298,4 +298,20 @@ class TestStructuredDataSerializationContracts:
"detected_schemas": ["test"], "detected_schemas": ["test"],
"confidence": 0.9 "confidence": 0.9
} }
assert serialize_deserialize_test(QuestionToStructuredQueryResponse, response_data) assert serialize_deserialize_test(QuestionToStructuredQueryResponse, response_data)
def test_structured_query_serialization(self):
"""Test structured query request/response serialization contract"""
# Test request
request_data = {
"question": "Show me all customers"
}
assert serialize_deserialize_test(StructuredQueryRequest, request_data)
# Test response
response_data = {
"error": None,
"data": '{"customers": [{"id": "1", "name": "John"}]}',
"errors": []
}
assert serialize_deserialize_test(StructuredQueryResponse, response_data)