Skip to content

Commit d70288b

Browse files
committed
CRAI suggestions
1 parent 1e86213 commit d70288b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

airos/airos8.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import json
66
import logging
7-
from urllib.parse import urlparse
7+
from urllib.parse import quote, urlparse
88

99
import aiohttp
1010

@@ -235,7 +235,7 @@ async def stakick(self, mac_address: str = None) -> bool:
235235

236236
kick_payload = {
237237
"staif": "ath0",
238-
"staid": urlparse(mac_address.upper()),
238+
"staid": quote(mac_address.upper(), safe=""),
239239
}
240240

241241
kick_request_headers["Content-Type"] = (

tests/test_stations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ async def test_reconnect(airos_device, base_url):
7070

7171
with (
7272
patch.object(airos_device.session, "post", return_value=mock_stakick_response),
73-
patch.object(airos_device, "connected", return_value=mock_stakick_response),
73+
patch.object(airos_device, "connected", True),
7474
):
7575
assert await airos_device.stakick("01:23:45:67:89:aB")
7676

0 commit comments

Comments
 (0)