test(domain): wave197 asset/asset_library 兼容层 +12 #1161
Executable
+61
@@ -0,0 +1,61 @@
|
||||
"""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
|
||||
Reference in New Issue
Block a user