fleet-platform/tests/test_projector.py
kianiadee 6eb6b4716c
Some checks are pending
build / lint-test (push) Waiting to run
build / build-push (push) Blocked by required conditions
Fix camera/tracker dedup (device_type at provision + backfill) and finish refresh-token flow
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 00:08:56 +03:00

19 lines
566 B
Python

import pytest
from app.projectors.live_positions import _classify_device_type
@pytest.mark.parametrize(
"device_name,expected",
[
("John Mbugua - KDW 573B_cam", "camera"),
("John Mbugua - KDW 573B_CAM", "camera"),
("John Mbugua - KDW 573B", "tracker"),
("Parked - KMGK 596V", "tracker"),
("JC400P-92732", "tracker"),
("", "tracker"),
(None, "tracker"),
],
)
def test_classify_device_type(device_name: str | None, expected: str) -> None:
assert _classify_device_type(device_name) == expected