mirror of
https://github.com/MemeMeow-Studio/MemeMeow.git
synced 2026-10-18 21:52:59 +08:00
5ecda39843
- 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.
16 lines
566 B
Python
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()
|