Test workflow: configure, enable export, collect data, verify export.
(api_client, device_simulator, clean_state)
| 48 | |
| 49 | |
| 50 | def test_export_workflow(api_client, device_simulator, clean_state): |
| 51 | """ |
| 52 | Test workflow: configure, enable export, collect data, verify export. |
| 53 | """ |
| 54 | api_client.configure_network(host="127.0.0.1", port=9000, socket_type="tcp") |
| 55 | |
| 56 | api_client.enable_csv_export() |
| 57 | time.sleep(0.3) |
| 58 | |
| 59 | api_client.connect_device() |
| 60 | assert device_simulator.wait_for_connection(timeout=5.0) |
| 61 | |
| 62 | frames = DataGenerator.generate_realistic_telemetry( |
| 63 | duration_seconds=3.0, |
| 64 | frequency_hz=10.0, |
| 65 | frame_format="json", |
| 66 | checksum_type=ChecksumType.CRC16, |
| 67 | ) |
| 68 | |
| 69 | device_simulator.send_frames(frames, interval_seconds=0.1) |
| 70 | time.sleep(3.5) |
| 71 | |
| 72 | # Verify export is enabled and data was processed |
| 73 | export_status = api_client.get_csv_export_status() |
| 74 | assert export_status["enabled"], "CSV export should be enabled" |
| 75 | |
| 76 | api_client.disconnect_device() |
| 77 | api_client.command("csvExport.close") |
| 78 | time.sleep(0.5) |
| 79 | |
| 80 | api_client.disable_csv_export() |
| 81 | |
| 82 | |
| 83 | def test_reconnection_workflow(api_client, device_simulator, clean_state): |
nothing calls this directly
no test coverage detected