test(webui): add unit tests for ConfigSchemaGenerator

- Test field descriptions from field_docs
- Test json_schema_extra merging
- Test Pydantic constraints mapping
- Test nested model schema handling
- Test fields without extra metadata

All 5 tests passing. Completes Task 7 of webui-config-visualization-refactor plan.
This commit is contained in:
DrSmoothl
2026-02-17 17:14:48 +08:00
parent 2962a95341
commit 4e5d091417
3 changed files with 84 additions and 0 deletions

6
pytests/conftest.py Normal file
View File

@@ -0,0 +1,6 @@
import sys
from pathlib import Path
# Add project root to Python path so src imports work
project_root = Path(__file__).parent.parent.absolute()
sys.path.insert(0, str(project_root))