Spaces:
Runtime error
Runtime error
Download dev-agent/tests/test_validation.py from BeastGokul/MVP: direct link, hf CLI and curl.
- Browser
- Download file 645 Bytes
-
https://huggingface.co/spaces/BeastGokul/MVP/resolve/main/dev-agent/tests/test_validation.py
- Command line
-
hf download hf://spaces/BeastGokul/MVP/dev-agent/tests/test_validation.py
-
curl -L -o test_validation.py https://huggingface.co/spaces/BeastGokul/MVP/resolve/main/dev-agent/tests/test_validation.py
645 Bytes
| 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 | |