Skip to content

Commit 91690f4

Browse files
committed
apply ruff
1 parent c3131af commit 91690f4

File tree

1 file changed

+73
-13
lines changed

1 file changed

+73
-13
lines changed

tests/test_reconnect.py

Lines changed: 73 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class FakeConnectionManager:
2626
"""
2727
Fake ConnectionManager class
2828
"""
29+
2930
def __init__(self, socket):
3031
self._socket = socket
3132

@@ -72,25 +73,84 @@ def handle_disconnect(client, user_data, zero):
7273
testdata = [
7374
(
7475
[],
75-
bytearray([0x20, 0x02, 0x00, 0x00, # CONNACK
76-
0x90, 0x03, 0x00, 0x01, 0x00, # SUBACK
77-
0x20, 0x02, 0x00, 0x00, # CONNACK
78-
0x90, 0x03, 0x00, 0x02, 0x00]), # SUBACK
76+
bytearray(
77+
[
78+
0x20,
79+
0x02,
80+
0x00,
81+
0x00, # CONNACK
82+
0x90,
83+
0x03,
84+
0x00,
85+
0x01,
86+
0x00, # SUBACK
87+
0x20,
88+
0x02,
89+
0x00,
90+
0x00, # CONNACK
91+
0x90,
92+
0x03,
93+
0x00,
94+
0x02,
95+
0x00,
96+
]
97+
), # SUBACK
7998
),
8099
(
81100
[("foo/bar", 0)],
82-
bytearray([0x20, 0x02, 0x00, 0x00, # CONNACK
83-
0x90, 0x03, 0x00, 0x01, 0x00, # SUBACK
84-
0x20, 0x02, 0x00, 0x00, # CONNACK
85-
0x90, 0x03, 0x00, 0x02, 0x00]), # SUBACK
101+
bytearray(
102+
[
103+
0x20,
104+
0x02,
105+
0x00,
106+
0x00, # CONNACK
107+
0x90,
108+
0x03,
109+
0x00,
110+
0x01,
111+
0x00, # SUBACK
112+
0x20,
113+
0x02,
114+
0x00,
115+
0x00, # CONNACK
116+
0x90,
117+
0x03,
118+
0x00,
119+
0x02,
120+
0x00,
121+
]
122+
), # SUBACK
86123
),
87124
(
88125
[("foo/bar", 0), ("bah", 0)],
89-
bytearray([0x20, 0x02, 0x00, 0x00, # CONNACK
90-
0x90, 0x03, 0x00, 0x01, 0x00, 0x00, # SUBACK
91-
0x20, 0x02, 0x00, 0x00, # CONNACK
92-
0x90, 0x03, 0x00, 0x02, 0x00, # SUBACK
93-
0x90, 0x03, 0x00, 0x03, 0x00]), # SUBACK
126+
bytearray(
127+
[
128+
0x20,
129+
0x02,
130+
0x00,
131+
0x00, # CONNACK
132+
0x90,
133+
0x03,
134+
0x00,
135+
0x01,
136+
0x00,
137+
0x00, # SUBACK
138+
0x20,
139+
0x02,
140+
0x00,
141+
0x00, # CONNACK
142+
0x90,
143+
0x03,
144+
0x00,
145+
0x02,
146+
0x00, # SUBACK
147+
0x90,
148+
0x03,
149+
0x00,
150+
0x03,
151+
0x00,
152+
]
153+
), # SUBACK
94154
),
95155
]
96156

0 commit comments

Comments
 (0)