feat: include recon identity in exports
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
import sqlite3
|
||||
@@ -1109,6 +1110,23 @@ class ReconReportTest(unittest.TestCase):
|
||||
self.assertIn('unassociated,1', text)
|
||||
self.assertIn('C8:9E:43:64:80:80', text)
|
||||
|
||||
def test_json_download_preserves_enriched_recon_data(self):
|
||||
status, payload = server.h_recon_scan_download(self._ctx(('1',)))
|
||||
self.assertEqual(status, 200)
|
||||
data = json.loads(payload.data.decode('utf-8'))
|
||||
self.assertIn('device_identity', data['aps'][0])
|
||||
self.assertIn('associations', data['clients'][0])
|
||||
|
||||
def test_csv_download_contains_identity_counts_and_associations(self):
|
||||
status, payload = server.h_recon_scan_download_csv(self._ctx(('1',)))
|
||||
self.assertEqual(status, 200)
|
||||
text = payload.data.decode('utf-8')
|
||||
self.assertIn('Device Identity', text)
|
||||
self.assertIn('Client Count', text)
|
||||
self.assertIn('Confirmed SSIDs', text)
|
||||
self.assertIn('Anderson-5', text)
|
||||
self.assertIn('Local/Randomized', text)
|
||||
|
||||
def test_html_download_contains_stats(self):
|
||||
with mock.patch.object(server, '_gps_status_data', return_value={'lock': False}):
|
||||
status, payload = server.h_recon_scan_download_html(self._ctx(('1',)))
|
||||
@@ -1137,6 +1155,16 @@ class ReconReportTest(unittest.TestCase):
|
||||
# no GPS line without a fix
|
||||
self.assertNotIn('GPS:', text)
|
||||
|
||||
def test_html_report_includes_confirmed_clients(self):
|
||||
with mock.patch.object(server, '_gps_status_data', return_value={'lock': False}):
|
||||
status, payload = server.h_recon_scan_download_html(self._ctx(('1',)))
|
||||
self.assertEqual(status, 200)
|
||||
text = payload.data.decode('utf-8')
|
||||
self.assertIn('Confirmed Clients', text)
|
||||
self.assertIn('AE:77:C0:EB:31:41', text)
|
||||
self.assertIn('handshake', text)
|
||||
self.assertNotIn('ProbeOnlySSID', text)
|
||||
|
||||
def test_html_report_includes_gps_when_locked(self):
|
||||
with mock.patch.object(server, '_gps_status_data',
|
||||
return_value={'lock': True, 'lat': 37.7,
|
||||
|
||||
Reference in New Issue
Block a user