style: refresh rgb led panel ui

This commit is contained in:
2026-05-15 20:14:46 +08:00
parent 9ff66372d3
commit 120a7f5624
2 changed files with 62 additions and 35 deletions
+3
View File
@@ -53,6 +53,9 @@ def main():
t = threading.Thread(target=httpd.serve_forever, daemon=True)
t.start()
try:
import urllib.request as _urlreq
html = _urlreq.urlopen(f'http://127.0.0.1:{port}/', timeout=5).read().decode()
assert 'RGB LED 控制台' in html and '关闭全部' in html and 'oncount' in html
leds = req(port, '/api/leds')
names = [led['name'] for led in leds['leds']]
assert leds['ok'] and names == ['blue:wan', 'green:wlan', 'red:power']