core/tests
Ziv 36db302cc8
Enhance Dynalite Integration after review (#31760)
* fixes per Martin Hjelmare

* pylint fix

* final fixes per request

* fixed unit tests for new config flow

* Added unit-tests to increase coverage. at 97% now

* Added unit tests for 100% coverage of component

* removed configured_host function and updated config_flow unit tests

* added a pylint directive since it tells me by mistake DOMAIN is not used

* fixed path (removed __init__)

* Update homeassistant/components/dynalite/light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/dynalite/light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* fixed the test as we moved from schedule_update_... to async_schedule

* Update homeassistant/components/dynalite/bridge.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* removed context from config_flow
changed test_init to use the core methods

* moved test_light to also use the core interfaces

* moved to config_entries.async_unload

* additional fixes for the tests

* pylint fix and removed unnecessary code

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* added break in loop

* removed last mock_coro reference
pylint fix

* added coverage for try_connect

* added check for a successful connection before bridge.async_setup succeeds
also added a "nowait" config option (default False) that avoids this check

* changed log level

* fixed accidental chmod I did

* fixed accidental change

* not storing config in bridge

* not patching asyncio

* moved CONFIG_SCHEMA into component

* moved all logs to start capitalized (and revised some of them)

* moved test_config_flow to not patch the DynaliteBridge

* also took DynaliteBridge patching out of test_init

* removed NO_WAIT

* fixes to SCHEMA

* changed _ in multi-word CONF
moved imports to component const.py

* removed tries

* removed redundant tests

* fixed some small change i broke in the library. only version update

* fixed rewuirements

* Update tests/components/dynalite/test_config_flow.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_light.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/dynalite/test_config_flow.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* removed HIDDEN_ENTITY
removed hass in test fixture

* black fixes

* removed final piece of hidden_entity from light
fix in the library
updated config flow so if the entry is already set but with a different config, calls async_update_entry

* removed DATA_CONFIGS - no longer necessary

* pylint fixes

* added coverage

* use abort in config_flow

* test update

* removed logs

* test that update actually updates the entry

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-02-21 23:29:59 +01:00
..
auth Spelling: Config(uration) (#31782) 2020-02-13 08:27:00 -08:00
components Enhance Dynalite Integration after review (#31760) 2020-02-21 23:29:59 +01:00
fixtures Significantly reduce code in august integration (#32030) 2020-02-20 21:06:24 -08:00
hassfest Make Hassfest stricter pt 2 (#30068) 2019-12-19 14:00:22 +01:00
helpers Fix entity registry not saving name/icon (#31932) 2020-02-18 08:32:34 -08:00
mock Black 2019-07-31 12:25:30 -07:00
resources
scripts Add Safe Mode (#30723) 2020-01-14 13:03:02 -08:00
test_util Sort imports according to PEP8 for 'tests' (#29791) 2019-12-09 16:52:24 +01:00
testing_config Add brightness_step to light.turn_on (#31452) 2020-02-04 16:13:29 -08:00
util Report which data causes JSON serialization error (#31901) 2020-02-17 10:49:42 -08:00
__init__.py
bandit.yaml Enable some more bandit checks (#30857) 2020-01-20 18:44:55 +02:00
common.py Restore unit_of_measurement from entity registry (#30780) 2020-01-15 08:09:05 -08:00
conftest.py Fix check_real location guard (#31890) 2020-02-16 15:33:09 -08:00
test_bootstrap.py Only check frontend for safe mode if frontend wanted to be loa… (#31969) 2020-02-19 15:56:46 +01:00
test_config.py Catch unexpected exceptions when validating config (#31795) 2020-02-13 22:43:07 +01:00
test_config_entries.py Add update_entry dict to unique ID flow abort helper (#31090) 2020-01-23 11:21:19 -08:00
test_core.py Extend safe mode (#31927) 2020-02-18 11:52:38 -08:00
test_data_entry_flow.py Rework FlowManager to use inheritance (#30133) 2020-01-03 11:52:01 +01:00
test_loader.py Extend safe mode (#31927) 2020-02-18 11:52:38 -08:00
test_main.py Sort imports according to PEP8 for 'tests' (#29791) 2019-12-09 16:52:24 +01:00
test_requirements.py Sort imports for requirements.py and its test using isort (#29836) 2019-12-11 12:12:06 +01:00
test_setup.py Various string cleanups (#30435) 2020-01-03 14:47:06 +01:00