ComfyUI/tests-unit/assets_test
Luke Mino-Altherr e3b8e512ca
Some checks failed
Python Linting / Run Ruff (push) Waiting to run
Python Linting / Run Pylint (push) Waiting to run
Build package / Build Test (3.10) (push) Has been cancelled
Build package / Build Test (3.11) (push) Has been cancelled
Build package / Build Test (3.12) (push) Has been cancelled
Build package / Build Test (3.13) (push) Has been cancelled
Build package / Build Test (3.14) (push) Has been cancelled
refactor: use explicit dataclasses instead of ORM objects in service layer
Replace dict/ORM object returns with explicit dataclasses to fix
DetachedInstanceError when accessing ORM attributes after session closes.

- Add app/assets/services/schemas.py with AssetData, AssetInfoData,
  AssetDetailResult, and RegisterAssetResult dataclasses
- Update asset_management.py and ingest.py to return dataclasses
- Update manager.py to use attribute access on dataclasses
- Fix created_new to be False in create_asset_from_hash (content exists)
- Add DependencyMissingError for better blake3 missing error handling
- Update tests to use attribute access instead of dict subscripting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 18:39:07 -08:00
..
queries refactor: improve function naming for clarity and consistency 2026-02-03 14:20:36 -08:00
services refactor: use explicit dataclasses instead of ORM objects in service layer 2026-02-03 18:39:07 -08:00
conftest.py fix: resolve test import errors and module collision in assets_test 2026-02-03 14:57:52 -08:00
helpers.py fix: resolve test import errors and module collision in assets_test 2026-02-03 14:57:52 -08:00
test_assets_missing_sync.py fix: resolve test import errors and module collision in assets_test 2026-02-03 14:57:52 -08:00
test_crud.py fix: resolve test import errors and module collision in assets_test 2026-02-03 14:57:52 -08:00
test_downloads.py fix: resolve test import errors and module collision in assets_test 2026-02-03 14:57:52 -08:00
test_list_filter.py Assets Part 2 - add more endpoints (#12125) 2026-01-31 02:22:05 -05:00
test_metadata_filters.py Assets Part 2 - add more endpoints (#12125) 2026-01-31 02:22:05 -05:00
test_prune_orphaned_assets.py fix: resolve test import errors and module collision in assets_test 2026-02-03 14:57:52 -08:00
test_tags_api.py fix: resolve test import errors and module collision in assets_test 2026-02-03 14:57:52 -08:00
test_uploads.py Assets Part 2 - add more endpoints (#12125) 2026-01-31 02:22:05 -05:00