style: refresh rgb led panel ui
This commit is contained in:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user