Skip to content

Commit 80f7afd

Browse files
committed
Fixes
1 parent 00691d5 commit 80f7afd

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

tests/test_pairing.py

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,29 @@
9292
),
9393
}
9494

95+
PARTLY_RESPONSE_MESSAGES = {
96+
b"\x05\x05\x03\x0300161111111111111111": (
97+
"Clock set 1111111111111111",
98+
b"000000C1", # Success ack
99+
b"0000" + b"00D7" + b"1111111111111111", # msg_id, ClockAccepted, mac
100+
),
101+
b"\x05\x05\x03\x0300162222222222222222": (
102+
"Clock set 2222222222222222",
103+
b"000000C1", # Success ack
104+
b"0000" + b"00D7" + b"2222222222222222", # msg_id, ClockAccepted, mac
105+
),
106+
b"\x05\x05\x03\x0300163333333333333333": (
107+
"Clock set 3333333333333333",
108+
b"000000C1", # Success ack
109+
b"0000" + b"00D7" + b"3333333333333333", # msg_id, ClockAccepted, mac
110+
),
111+
b"\x05\x05\x03\x0300164444444444444444": (
112+
"Clock set 4444444444444444",
113+
b"000000C1", # Success ack
114+
b"0000" + b"00D7" + b"4444444444444444", # msg_id, ClockAccepted, mac
115+
),
116+
}
117+
95118
SECOND_RESPONSE_MESSAGES = {
96119
b"\x05\x05\x03\x03000D55555555555555555E46\r\n": (
97120
"ping reply for 5555555555555555",
@@ -420,7 +443,7 @@ async def dummy_fn(self, request: pw_requests.PlugwiseRequest, test: bool) -> No
420443
@pytest.mark.asyncio
421444
async def test_pair_plus(self, monkeypatch: pytest.MonkeyPatch) -> None:
422445
"""Test pairing a plus-device."""
423-
mock_serial = MockSerial(None)
446+
# mock_serial = MockSerial(None)
424447
monkeypatch.setattr(
425448
pw_connection_manager,
426449
"create_serial_connection",

0 commit comments

Comments
 (0)