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)
|