完成渠道模块的单元测试目录搭建,新增多个领域模型、端口、中间件、事件、服务以及基础设施层的单元测试文件,同时补充了conftest.py的环境变量配置,完善测试基础环境。
18 lines
443 B
Python
18 lines
443 B
Python
from __future__ import annotations
|
|
|
|
from yuxi.channel.domain.middleware.configurable import Configurable
|
|
|
|
|
|
def test_configurable_is_protocol() -> None:
|
|
assert hasattr(Configurable, "on_config_updated")
|
|
|
|
|
|
class _FakeConfigurable:
|
|
def on_config_updated(self, config: dict) -> list[str]:
|
|
return ["updated"]
|
|
|
|
|
|
def test_fake_configurable_is_instance() -> None:
|
|
obj = _FakeConfigurable()
|
|
assert isinstance(obj, Configurable)
|