Publish curated Unraid-AppOps-Gateway source from 034c9f844d2455850ba37b31379b7edaa786583e
This commit is contained in:
1 parent
c61fbfd87f
commit
1a54836efc
101 files changed
+4973
-1298
No files matched your search
@@ -91,7 +91,12 @@ def test_voice_commands_expose_full_command_contract(api_client):
|
||||
assert all(command["policyDecision"] != "blocked" for command in commands)
|
||||
|
||||
|
||||
def test_voice_export_endpoints_require_voice_token(api_client):
|
||||
def test_voice_export_endpoints_require_voice_token_or_signed_in_user(api_client, monkeypatch):
|
||||
from fastapi import HTTPException
|
||||
from backend.app.services import user_access
|
||||
def anonymous(_request):
|
||||
raise HTTPException(401, "Sign in required")
|
||||
monkeypatch.setattr(user_access, "current_user", anonymous)
|
||||
missing = api_client.get("/api/voice/home-assistant/export")
|
||||
wrong = api_client.get(
|
||||
"/api/voice/home-assistant/export",
|
||||
@@ -113,7 +118,7 @@ def test_operator_voice_catalog_is_read_only_and_does_not_require_browser_secret
|
||||
assert 'test-voice-token' not in str(export.json())
|
||||
assert dry_run.status_code == 200
|
||||
assert dry_run.json()['executed'] is False
|
||||
assert api_client.post('/api/voice/actions/setup/status').status_code == 401
|
||||
assert api_client.post('/api/voice/actions/setup/status').status_code == 200
|
||||
|
||||
|
||||
def test_operator_voice_readiness_uses_live_home_assistant_state(api_client, monkeypatch):
|
||||
|
||||
Reference in new issue
Block a user