1
mirror of https://github.com/home-assistant/core synced 2024-09-18 19:55:20 +02:00
ha-core/tests/components/vizio/__init__.py
Raman Gupta ac771addc1 Add Config Flow support, Device Registry support, available property to vizio component (#30653)
* add config flow support, device registry support, available property

* raise PlatformNotReady if HA cant connect to device

* remove test logging statement and fix integration title

* store import and last user input values so user can see errors next to value that caused error

* add PARALLEL_UPDATES

* add missing type hints

* add missing type hints to tests

* fix options config flow title

* changes based on review

* better key name for message when cant connect

* fix missed update to key name

* fix comments

* remove logger from test which was used to debug and update test function names and docstrings to be more accurate

* add __init__.py to vizio tests module

* readded options flow and updated main component to handle options updates, set unique ID to serial, fixes based on review

* pop hass.data in media_player unload instead of in __init__ since it is set in media_player

* update requirements_all and requirements_test_all

* make unique_id key name a constant

* remove additional line breaks after docstrings

* unload entries during test_user_flow and test_import_flow tests to hopefully reduce teardown time

* try to speed up tests

* remove unnecessary code, use event bus to track options updates, move patches to pytest fixtures and fix patch scoping

* fix comment

* remove translations from commit

* suppress API error logging when checking for device availability as it can spam logs

* update requirements_all and requirements_test_all

* dont pass hass to entity since it is passed to entity anyway, remove entity unload from tests, other misc changes from review

* fix clearing listeners

* use config_entry unique ID for unique ID and use config_entry entry ID as update signal

* update config flow based on suggested changes

* update volume step on config import if it doesn't match config_entry volume step

* update config_entry data and options with new volume step value

* copy entry.data and entry.options before updating when updating config_entry

* fix test_import_entity_already_configured
2020-01-15 11:43:55 +01:00

2 lines
39 B
Python

"""Tests for the Vizio integration."""