init home-assistant
This commit is contained in:
1
home-assistant/tests/non_packaged_scripts/__init__.py
Normal file
1
home-assistant/tests/non_packaged_scripts/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""Tests for the non-packaged scripts in the script directory."""
|
||||
@@ -0,0 +1,62 @@
|
||||
# serializer version: 1
|
||||
# name: test_alexa_locales
|
||||
'''
|
||||
Missing interfaces:
|
||||
['Alexa.ApplicationStateReporter',
|
||||
'Alexa.AuthorizationController',
|
||||
'Alexa.AutomationManagement',
|
||||
'Alexa.Commissionable',
|
||||
'Alexa.Cooking',
|
||||
'Alexa.DataController',
|
||||
'Alexa.InventoryLevelSensor',
|
||||
'Alexa.InventoryLevelUsageSensor',
|
||||
'Alexa.InventoryUsageSensor',
|
||||
'Alexa.KeypadController',
|
||||
'Alexa.Launcher',
|
||||
'Alexa.PercentageController',
|
||||
'Alexa.ProactiveNotificationSource',
|
||||
'Alexa.RecordController',
|
||||
'Alexa.RemoteVideoPlayer',
|
||||
'Alexa.RTCSessionController',
|
||||
'Alexa.SimpleEventSource',
|
||||
'Alexa.UIController',
|
||||
'Alexa.UserPreference',
|
||||
'Alexa.VideoRecorder',
|
||||
'Alexa.WakeOnLANController']
|
||||
|
||||
|
||||
Interfaces where upstream locales are not subsets of the core locales:
|
||||
[]
|
||||
|
||||
|
||||
Interfaces checked ok:
|
||||
['AlexaBrightnessController',
|
||||
'AlexaCameraStreamController',
|
||||
'AlexaChannelController',
|
||||
'AlexaColorController',
|
||||
'AlexaColorTemperatureController',
|
||||
'AlexaContactSensor',
|
||||
'AlexaDoorbellEventSource',
|
||||
'AlexaEndpointHealth',
|
||||
'AlexaEqualizerController',
|
||||
'AlexaInputController',
|
||||
'AlexaLockController',
|
||||
'AlexaModeController',
|
||||
'AlexaMotionSensor',
|
||||
'AlexaPlaybackController',
|
||||
'AlexaPlaybackStateReporter',
|
||||
'AlexaPowerController',
|
||||
'AlexaPowerLevelController',
|
||||
'AlexaRangeController',
|
||||
'AlexaSceneController',
|
||||
'AlexaSecurityPanelController',
|
||||
'AlexaSeekController',
|
||||
'AlexaSpeaker',
|
||||
'AlexaStepSpeaker',
|
||||
'AlexaTemperatureSensor',
|
||||
'AlexaThermostatController',
|
||||
'AlexaTimeHoldController',
|
||||
'AlexaToggleController']
|
||||
|
||||
'''
|
||||
# ---
|
||||
@@ -0,0 +1,29 @@
|
||||
"""Test the alexa_locales script."""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
import requests_mock
|
||||
from syrupy import SnapshotAssertion
|
||||
|
||||
from script.alexa_locales import SITE, run_script
|
||||
|
||||
|
||||
def test_alexa_locales(
|
||||
capsys: pytest.CaptureFixture[str],
|
||||
requests_mock: requests_mock.Mocker,
|
||||
snapshot: SnapshotAssertion,
|
||||
) -> None:
|
||||
"""Test alexa_locales script."""
|
||||
fixture_file = (
|
||||
Path(__file__).parent.parent / "fixtures/non_packaged_scripts/alexa_locales.txt"
|
||||
)
|
||||
requests_mock.get(
|
||||
SITE,
|
||||
text=fixture_file.read_text(encoding="utf-8"),
|
||||
)
|
||||
|
||||
run_script()
|
||||
|
||||
captured = capsys.readouterr()
|
||||
assert captured.out == snapshot
|
||||
Reference in New Issue
Block a user