feat: Add OSINT features (v0.1.2)
- MAC vendor lookup (IEEE OUI database) - BLE company_id to manufacturer mapping - Device profile enrichment in API responses - Export endpoints: devices.csv, devices.json, alerts.csv, probes.csv - Auto-populate vendor on device creation - CLI command: flask download-oui - Makefile target: make oui 13 tests passing
This commit is contained in:
17
tests/test_api/test_export.py
Normal file
17
tests/test_api/test_export.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""Export endpoint tests."""
|
||||
|
||||
|
||||
def test_export_devices_csv_empty(client):
|
||||
"""Test exporting devices CSV when empty."""
|
||||
response = client.get('/api/v1/export/devices.csv')
|
||||
assert response.status_code == 200
|
||||
assert response.content_type == 'text/csv; charset=utf-8'
|
||||
assert b'mac,type,vendor' in response.data
|
||||
|
||||
|
||||
def test_export_devices_json_empty(client):
|
||||
"""Test exporting devices JSON when empty."""
|
||||
response = client.get('/api/v1/export/devices.json')
|
||||
assert response.status_code == 200
|
||||
assert response.content_type == 'application/json'
|
||||
assert response.json == []
|
||||
Reference in New Issue
Block a user