Files
MemeMeow/tests/test_database_models.py
infstellar 5ecda39843 Add unit tests for image processing worker, operation policy, reverse image provider, and scope handling
- Implement tests for the ImageProcessingWorker to validate task deduplication and policy interactions.
- Create tests for operation policy to ensure proper grant handling and error responses.
- Add tests for reverse image provider response structure to validate empty and malformed results.
- Develop comprehensive tests for scope resolution and service validation to ensure correct behavior in various scenarios.
2026-08-17 12:50:29 +08:00

16 lines
566 B
Python

"""不依赖外部数据库的 ORM 约束和 migration 入口检查。"""
from __future__ import annotations
from pathlib import Path
from alembic.config import Config
from alembic.script import ScriptDirectory
def test_single_forward_migration_head():
"""仓库只暴露一个前向 revision head,回滚由 migration 明确拒绝。"""
script = ScriptDirectory.from_config(Config("alembic.ini"))
assert script.get_heads() == ["0010_separate_image_pipeline_and_stage_tasks"]
assert (Path("alembic/versions/0001_postgres_scoped.py")).is_file()