From 40a4fa91268f871aaae23354748177a57873ab56 Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Wed, 12 Mar 2025 19:04:03 +0000 Subject: [PATCH] ruff format reconnect tests --- tests/test_reconnect.py | 152 +++++++++++++++++++--------------------- 1 file changed, 72 insertions(+), 80 deletions(-) diff --git a/tests/test_reconnect.py b/tests/test_reconnect.py index bd9d3926..52b8c76f 100644 --- a/tests/test_reconnect.py +++ b/tests/test_reconnect.py @@ -74,84 +74,78 @@ def handle_disconnect(client, user_data, zero): testdata = [ ( [], - bytearray( - [ - 0x20, # CONNACK - 0x02, - 0x00, - 0x00, - 0x90, # SUBACK - 0x03, - 0x00, - 0x01, - 0x00, - 0x20, # CONNACK - 0x02, - 0x00, - 0x00, - 0x90, # SUBACK - 0x03, - 0x00, - 0x02, - 0x00, - ] - ), + bytearray([ + 0x20, # CONNACK + 0x02, + 0x00, + 0x00, + 0x90, # SUBACK + 0x03, + 0x00, + 0x01, + 0x00, + 0x20, # CONNACK + 0x02, + 0x00, + 0x00, + 0x90, # SUBACK + 0x03, + 0x00, + 0x02, + 0x00, + ]), ), ( [("foo/bar", 0)], - bytearray( - [ - 0x20, # CONNACK - 0x02, - 0x00, - 0x00, - 0x90, # SUBACK - 0x03, - 0x00, - 0x01, - 0x00, - 0x20, # CONNACK - 0x02, - 0x00, - 0x00, - 0x90, # SUBACK - 0x03, - 0x00, - 0x02, - 0x00, - ] - ), + bytearray([ + 0x20, # CONNACK + 0x02, + 0x00, + 0x00, + 0x90, # SUBACK + 0x03, + 0x00, + 0x01, + 0x00, + 0x20, # CONNACK + 0x02, + 0x00, + 0x00, + 0x90, # SUBACK + 0x03, + 0x00, + 0x02, + 0x00, + ]), ), ( [("foo/bar", 0), ("bah", 0)], - bytearray( - [ - 0x20, # CONNACK - 0x02, - 0x00, - 0x00, - 0x90, # SUBACK - 0x03, - 0x00, - 0x01, - 0x00, - 0x00, - 0x20, # CONNACK - 0x02, - 0x00, - 0x00, - 0x90, # SUBACK - 0x03, - 0x00, - 0x02, - 0x00, - 0x90, # SUBACK - 0x03, - 0x00, - 0x03, - 0x00, - ] - ), + bytearray([ + 0x20, # CONNACK + 0x02, + 0x00, + 0x00, + 0x90, # SUBACK + 0x03, + 0x00, + 0x01, + 0x00, + 0x00, + 0x20, # CONNACK + 0x02, + 0x00, + 0x00, + 0x90, # SUBACK + 0x03, + 0x00, + 0x02, + 0x00, + 0x90, # SUBACK + 0x03, + 0x00, + 0x03, + 0x00, + ]), ), ] @@ -228,14 +222,12 @@ def test_reconnect_not_connected() -> None: ) mocket = Mocket( - bytearray( - [ - 0x20, # CONNACK - 0x02, - 0x00, - 0x00, - ] - ) + bytearray([ + 0x20, # CONNACK + 0x02, + 0x00, + 0x00, + ]) ) mqtt_client._connection_manager = FakeConnectionManager(mocket)