Add comprehensive test coverage for routes and nodes
Tests cover: - routes.py: Input validation, path traversal protection, JSON error handling, GUID sanitization (12 new tests) - nodes/ideogram4_nodes.py: Prompt assembly, bbox normalization, palette handling, JSON serialization, input coercion (28 new tests) All tests use mocks via conftest.py to avoid ComfyUI dependencies. Tests import the repo as a proper package so routes.py relative imports work unchanged. CI: Install aiohttp for route tests. Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This commit is contained in:
@@ -24,7 +24,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install flake8
|
||||
pip install flake8 aiohttp pytest pytest-asyncio
|
||||
|
||||
- name: Lint with flake8
|
||||
run: |
|
||||
@@ -43,7 +43,7 @@ jobs:
|
||||
|
||||
- name: Run unit tests
|
||||
run: |
|
||||
python -m unittest discover -s tests -p 'test_*.py' -v
|
||||
python -m pytest tests/ -v
|
||||
|
||||
javascript-check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user