refactor: rename project to LedGrab, split HA integration into separate repo
Lint & Test / test (push) Successful in 1m56s
Lint & Test / test (push) Successful in 1m56s
- Rename Python package: wled_controller -> ledgrab - Rename env var prefix: WLED_ -> LEDGRAB_ (with auto-migration for old vars) - Rename localStorage key: wled_api_key -> ledgrab_api_key (with migration) - Rename HA integration domain: wled_screen_controller -> ledgrab - Update all imports, build scripts, Docker, installer, config, docs - Remove HA integration (moved to ledgrab-haos-integration repo) - Remove hacs.json (belongs in HA repo now) - Add startup warning for users with old WLED_ env vars - All tests pass (715/715), ruff clean, tsc clean, frontend builds
This commit is contained in:
@@ -4,7 +4,7 @@ import time
|
||||
|
||||
import pytest
|
||||
|
||||
from wled_controller.api.routes.webhooks import _check_rate_limit, _rate_hits
|
||||
from ledgrab.api.routes.webhooks import _check_rate_limit, _rate_hits
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -25,6 +25,7 @@ class TestRateLimiter:
|
||||
for _ in range(30):
|
||||
_check_rate_limit("1.2.3.4")
|
||||
from fastapi import HTTPException
|
||||
|
||||
with pytest.raises(HTTPException) as exc_info:
|
||||
_check_rate_limit("1.2.3.4")
|
||||
assert exc_info.value.status_code == 429
|
||||
@@ -50,7 +51,7 @@ class TestRateLimiter:
|
||||
|
||||
class TestWebhookPayload:
|
||||
def test_valid_payload_model(self):
|
||||
from wled_controller.api.routes.webhooks import WebhookPayload
|
||||
from ledgrab.api.routes.webhooks import WebhookPayload
|
||||
|
||||
p = WebhookPayload(action="activate")
|
||||
assert p.action == "activate"
|
||||
@@ -60,7 +61,7 @@ class TestWebhookPayload:
|
||||
|
||||
def test_arbitrary_action_accepted_by_model(self):
|
||||
"""The model accepts any string; validation is in the route handler."""
|
||||
from wled_controller.api.routes.webhooks import WebhookPayload
|
||||
from ledgrab.api.routes.webhooks import WebhookPayload
|
||||
|
||||
p = WebhookPayload(action="bogus")
|
||||
assert p.action == "bogus"
|
||||
|
||||
Reference in New Issue
Block a user