e0b95e69d4
CI/CD Pipeline / Check if frontend-only change (push) Has been cancelled
CI/CD Pipeline / Validate - Code Quality (push) Has been cancelled
CI/CD Pipeline / Validate - Type Check (mypy) (push) Has been cancelled
CI/CD Pipeline / Validate - Migration (alembic) (push) Has been cancelled
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
CI/CD Pipeline / Frontend Unit Tests (push) Has been cancelled
CI/CD Pipeline / PR Build API Image (push) Has been cancelled
CI/CD Pipeline / PR Build Web Image (push) Has been cancelled
CI/CD Pipeline / PR Build Worker Image (push) Has been cancelled
CI/CD Pipeline / Build Staging API Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Web Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / CI Gate (push) Has been cancelled
62 lines
1.6 KiB
Python
Executable File
62 lines
1.6 KiB
Python
Executable File
"""asset / asset_library 兼容层单元测试."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from domain.asset import Asset, AssetStatus, AssetType, ClassificationStatus
|
|
from domain.asset_library import AssetLibrary, AssetLibraryKind, LibraryKind
|
|
|
|
|
|
class TestAssetType:
|
|
"""AssetType 常量类测试."""
|
|
|
|
def test_video_value(self):
|
|
assert AssetType.VIDEO == "video"
|
|
|
|
def test_image_value(self):
|
|
assert AssetType.IMAGE == "image"
|
|
|
|
def test_audio_value(self):
|
|
assert AssetType.AUDIO == "audio"
|
|
|
|
def test_three_types(self):
|
|
assert AssetType.VIDEO
|
|
assert AssetType.IMAGE
|
|
assert AssetType.AUDIO
|
|
|
|
|
|
class TestAssetReexports:
|
|
"""asset.py 重导出测试."""
|
|
|
|
def test_asset_reexported(self):
|
|
# Asset 类从 entities 转发,确认可访问
|
|
assert Asset is not None
|
|
|
|
def test_asset_status_reexported(self):
|
|
assert AssetStatus is not None
|
|
|
|
def test_classification_status_reexported(self):
|
|
assert ClassificationStatus is not None
|
|
|
|
|
|
class TestLibraryKind:
|
|
"""LibraryKind 常量类测试."""
|
|
|
|
def test_video_value(self):
|
|
assert LibraryKind.VIDEO == AssetLibraryKind.VIDEO
|
|
|
|
def test_voice_value(self):
|
|
assert LibraryKind.VOICE == AssetLibraryKind.VOICE
|
|
|
|
def test_image_value(self):
|
|
assert LibraryKind.IMAGE == AssetLibraryKind.IMAGE
|
|
|
|
|
|
class TestAssetLibraryReexports:
|
|
"""asset_library.py 重导出测试."""
|
|
|
|
def test_asset_library_reexported(self):
|
|
assert AssetLibrary is not None
|
|
|
|
def test_asset_library_kind_reexported(self):
|
|
assert AssetLibraryKind is not None
|