test: cover audio, sequences, pattern direction, and settings
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -352,19 +352,27 @@ def test_settings_controller(server):
|
||||
)
|
||||
assert resp.status_code == 400
|
||||
|
||||
resp = c.put(f"{base_url}/settings/settings", json={"wifi_channel": 11})
|
||||
resp = c.put(f"{base_url}/settings", json={"wifi_channel": 11})
|
||||
assert resp.status_code == 200
|
||||
|
||||
resp = c.put(f"{base_url}/settings/settings", json={"wifi_channel": 12})
|
||||
resp = c.put(f"{base_url}/settings", json={"wifi_channel": 12})
|
||||
assert resp.status_code == 400
|
||||
|
||||
resp = c.put(f"{base_url}/settings/settings", json={"global_brightness": 42})
|
||||
resp = c.put(f"{base_url}/settings", json={"global_brightness": 42})
|
||||
assert resp.status_code == 200
|
||||
resp = c.get(f"{base_url}/settings")
|
||||
assert resp.status_code == 200
|
||||
assert resp.json().get("global_brightness") == 42
|
||||
|
||||
resp = c.put(f"{base_url}/settings/settings", json={"global_brightness": 300})
|
||||
resp = c.put(
|
||||
f"{base_url}/settings",
|
||||
json={"sequence_switch_wait": "downbeat"},
|
||||
)
|
||||
assert resp.status_code == 200
|
||||
resp = c.get(f"{base_url}/settings")
|
||||
assert resp.json().get("sequence_switch_wait") == "downbeat"
|
||||
|
||||
resp = c.put(f"{base_url}/settings", json={"global_brightness": 300})
|
||||
assert resp.status_code == 400
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user