@@ -222,7 +222,7 @@ def _fc_with_mac(self, mac):
222222 return fc
223223
224224 def test_returns_device_dict (self ):
225- device = fritzbox .create_guest_wifi_device (self ._fc_with_mac ("AA:BB:CC:DD:EE:FF" ), "fritz.box" )
225+ device = fritzbox .create_guest_wifi_device (self ._fc_with_mac ("AA:BB:CC:DD:EE:FF" ))
226226 assert device is not None
227227 assert "mac_address" in device
228228 assert device ["hostname" ] == "Guest WiFi Network"
@@ -232,13 +232,13 @@ def test_returns_device_dict(self):
232232
233233 def test_guest_mac_has_locally_administered_bit (self ):
234234 """First byte must be 0x02 — locally-administered, unicast."""
235- device = fritzbox .create_guest_wifi_device (self ._fc_with_mac ("AA:BB:CC:DD:EE:FF" ), "fritz.box" )
235+ device = fritzbox .create_guest_wifi_device (self ._fc_with_mac ("AA:BB:CC:DD:EE:FF" ))
236236 first_byte = int (device ["mac_address" ].split (":" )[0 ], 16 )
237237 assert first_byte == 0x02
238238
239239 def test_guest_mac_format_is_valid (self ):
240240 """MAC must be 6 colon-separated lowercase hex pairs."""
241- device = fritzbox .create_guest_wifi_device (self ._fc_with_mac ("AA:BB:CC:DD:EE:FF" ), "fritz.box" )
241+ device = fritzbox .create_guest_wifi_device (self ._fc_with_mac ("AA:BB:CC:DD:EE:FF" ))
242242 parts = device ["mac_address" ].split (":" )
243243 assert len (parts ) == 6
244244 for part in parts :
@@ -248,27 +248,27 @@ def test_guest_mac_format_is_valid(self):
248248 def test_guest_mac_is_deterministic (self ):
249249 """Same Fritz!Box MAC must always produce the same guest MAC."""
250250 fc = self ._fc_with_mac ("AA:BB:CC:DD:EE:FF" )
251- mac1 = fritzbox .create_guest_wifi_device (fc , "fritz.box" )["mac_address" ]
252- mac2 = fritzbox .create_guest_wifi_device (fc , "fritz.box" )["mac_address" ]
251+ mac1 = fritzbox .create_guest_wifi_device (fc )["mac_address" ]
252+ mac2 = fritzbox .create_guest_wifi_device (fc )["mac_address" ]
253253 assert mac1 == mac2
254254
255255 def test_different_fritzbox_macs_produce_different_guest_macs (self ):
256- mac_a = fritzbox .create_guest_wifi_device (self ._fc_with_mac ("AA:BB:CC:DD:EE:01" ), "fritz.box" )["mac_address" ]
257- mac_b = fritzbox .create_guest_wifi_device (self ._fc_with_mac ("AA:BB:CC:DD:EE:02" ), "fritz.box" )["mac_address" ]
256+ mac_a = fritzbox .create_guest_wifi_device (self ._fc_with_mac ("AA:BB:CC:DD:EE:01" ))["mac_address" ]
257+ mac_b = fritzbox .create_guest_wifi_device (self ._fc_with_mac ("AA:BB:CC:DD:EE:02" ))["mac_address" ]
258258 assert mac_a != mac_b
259259
260260 def test_no_fritzbox_mac_uses_fallback (self ):
261261 """When DeviceInfo returns no MAC, fall back to 02:00:00:00:00:01."""
262262 fc = MagicMock ()
263263 fc .call_action .return_value = {"NewMACAddress" : "" }
264- device = fritzbox .create_guest_wifi_device (fc , "fritz.box" )
264+ device = fritzbox .create_guest_wifi_device (fc )
265265 assert device ["mac_address" ] == "02:00:00:00:00:01"
266266
267267 def test_device_info_exception_returns_none (self ):
268268 """If DeviceInfo call raises, create_guest_wifi_device must return None."""
269269 fc = MagicMock ()
270270 fc .call_action .side_effect = Exception ("Connection refused" )
271- device = fritzbox .create_guest_wifi_device (fc , "fritz.box" )
271+ device = fritzbox .create_guest_wifi_device (fc )
272272 assert device is None
273273
274274 def test_known_mac_produces_known_guest_mac (self ):
@@ -281,7 +281,7 @@ def test_known_mac_produces_known_guest_mac(self):
281281 digest = hashlib .md5 (f"GUEST:{ fritzbox_mac } " .encode ()).digest ()
282282 expected = "02:" + ":" .join (f"{ b :02x} " for b in digest [:5 ])
283283
284- device = fritzbox .create_guest_wifi_device (self ._fc_with_mac ("AA:BB:CC:DD:EE:FF" ), "fritz.box" )
284+ device = fritzbox .create_guest_wifi_device (self ._fc_with_mac ("AA:BB:CC:DD:EE:FF" ))
285285 assert device ["mac_address" ] == expected
286286
287287
0 commit comments