Spaces:
Runtime error
Runtime error
File size: 645 Bytes
595d60e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | from app.services.validation_service import ValidationService
def test_schema_validation_pass():
svc = ValidationService()
data = {
"name": "A",
"description": "",
"version": "1.0.0",
"connection": {"type": "api", "config": {"base_url": "http://x.com"}},
"trigger": {"type": "manual", "config": {}},
"mode": "workflow",
"steps": [],
"tools": [],
"input_schema": {},
"output_schema": {},
"error_handling": {"on_failure": "stop", "retry": {"enabled": False}},
"metadata": {}
}
res = svc.validate(data)
assert res.valid == True
|