fix: harden UI actions and daemon calls for reliable control (v1.3.2)
Retry and serialize pineapd/hak5 calls, queue virtual-pager keys, and grey out buttons until the pager finishes. Deploy now installs python3-light after factory firmware. Bump version to 1.3.2. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -51,6 +51,8 @@ class StatusTest(unittest.TestCase):
|
||||
def fake(args, timeout=20):
|
||||
if args == ['iwinfo']:
|
||||
return 0, 'wlan0 ESSID: "Pineapple"\n', ''
|
||||
if args[0] == 'iw':
|
||||
return 1, '', 'busy'
|
||||
if args == ['iwinfo', 'wlan0', 'assoclist']:
|
||||
return 0, '00:11:22:33:44:55 -64 dBm Signal: -64 dBm Rate: 12 Mbit/s\nAA:BB:CC:DD:EE:FF -40 dBm Signal: -40 dBm Rate: 24 Mbit/s\n', ''
|
||||
return 0, '', ''
|
||||
@@ -61,6 +63,23 @@ class StatusTest(unittest.TestCase):
|
||||
self.assertEqual(clients[0]['rssi'], -64)
|
||||
self.assertEqual(clients[0]['iface'], 'wlan0')
|
||||
|
||||
def test_assoc_clients_skips_monitor_ifaces(self):
|
||||
def fake(args, timeout=20):
|
||||
if args == ['iwinfo']:
|
||||
return 0, 'wlan0mon ESSID: unknown\nwlan0wpa ESSID: "x"\n', ''
|
||||
if args[0] == 'iw' and len(args) > 2 and args[2] == 'wlan0mon':
|
||||
raise AssertionError('must not query monitor ifaces')
|
||||
if args[:2] == ['iwinfo', 'wlan0mon']:
|
||||
raise AssertionError('must not query monitor ifaces')
|
||||
if args == ['iw', 'dev', 'wlan0wpa', 'station', 'dump']:
|
||||
return 0, 'Station aa:bb:cc:dd:ee:ff (on wlan0wpa)\n\tsignal: -50 dBm\n', ''
|
||||
return 1, '', ''
|
||||
server.device_run = fake
|
||||
clients = server.assoc_clients()
|
||||
self.assertEqual(len(clients), 1)
|
||||
self.assertEqual(clients[0]['mac'], 'AA:BB:CC:DD:EE:FF')
|
||||
self.assertEqual(clients[0]['iface'], 'wlan0wpa')
|
||||
|
||||
def test_h_status_shape(self):
|
||||
server.device_run = lambda args, timeout=20: (0, '', '')
|
||||
server.current_token = lambda: 'tok'
|
||||
|
||||
Reference in New Issue
Block a user