test: port the v1 endpoint and browser tests to v2

HTTP tests against a running controller (make test-api HOST=ip). They
snapshot every collection through /db and restore it afterwards. v1
behaviour v2 does not have yet is marked as a strict xfail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Opus 5.5 committed 2026-11-03 01:33:08 +13:00
1 parent 9d628aa3c8
commit 4b42391a46
15 files changed
+2055 -1

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
"""led-tool: configure drivers over USB serial (v1 controllers/led_tool.py)."""
from helpers import missing
# Every test here fails on v2
pytestmark = missing("led-tool (USB serial)")
def test_ports(c):
resp = c.get("/led-tool/ports")
assert resp.status_code == 200
assert isinstance(resp.json()["ports"], list)
def test_settings_requires_port(c):
assert c.get("/led-tool/settings").status_code == 400
def test_reset_requires_port(c):
assert c.post("/led-tool/reset", json={}).status_code == 400