File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66"""
77
88from collections .abc import Callable
9+ from typing import Any
910from unittest .mock import AsyncMock , MagicMock
1011
12+ from roborock .devices .transport .channel import Channel
1113from roborock .mqtt .health_manager import HealthManager
1214from roborock .protocols .v1_protocol import LocalProtocolVersion
1315from roborock .roborock_message import RoborockMessage
1416
1517
16- class FakeChannel :
17- """A stateful, in-memory transport simulator.
18+ class FakeChannel ( Channel ) :
19+ """A stateful, in-memory transport simulator implementing the Channel protocol .
1820
1921 It captures all published messages in `published_messages`, maintains a registry
2022 of active callbacks in `subscribers`, and enables tests or stateful simulators to
@@ -37,6 +39,8 @@ class FakeChannel:
3739 to simulate the device broadcasting a state change.
3840 """
3941
42+ subscribe : Any
43+
4044 def __init__ (self , is_local : bool = False ):
4145 """Initialize the fake channel."""
4246 self .subscribers : list [Callable [[RoborockMessage ], None ]] = []
You can’t perform that action at this time.
0 commit comments