test: cover recon identity associations

This commit is contained in:
2026-08-21 08:41:17 -05:00
parent cd54402892
commit 883a839692
+13 -1
View File
@@ -1164,7 +1164,6 @@ class ReconReportTest(unittest.TestCase):
self.assertIn('AE:77:C0:EB:31:41', text) self.assertIn('AE:77:C0:EB:31:41', text)
self.assertIn('handshake', text) self.assertIn('handshake', text)
self.assertNotIn('ProbeOnlySSID', text) self.assertNotIn('ProbeOnlySSID', text)
def test_html_report_includes_gps_when_locked(self): def test_html_report_includes_gps_when_locked(self):
with mock.patch.object(server, '_gps_status_data', with mock.patch.object(server, '_gps_status_data',
return_value={'lock': True, 'lat': 37.7, return_value={'lock': True, 'lat': 37.7,
@@ -1190,6 +1189,19 @@ class ReconReportTest(unittest.TestCase):
self.assertEqual(status, 503) self.assertEqual(status, 503)
class ReconFrontendTest(unittest.TestCase):
def test_recon_view_supports_identity_and_confirmed_associations(self):
path = os.path.join(os.path.dirname(__file__), '..', 'payload', 'user',
'remote_access', 'pager-webui', 'www', 'js', 'views.js')
with open(path, encoding='utf-8') as source_file:
source = source_file.read()
for expected in (
"identity: true", "clients: true", "associated_ssid",
"device_identity", "associations", "Confirmed Clients",
"No confirmed clients", "reconLoadCols", "Object.assign"):
self.assertIn(expected, source)
class ReconArchivesTest(unittest.TestCase): class ReconArchivesTest(unittest.TestCase):
"""Read-only history from pineapd-rotated databases (error-*-recon.db).""" """Read-only history from pineapd-rotated databases (error-*-recon.db)."""