Move components to folders (#20774)

* Move all components into folders

* Move component tests into folders

* Fix init moving

* Move tests

* Lint

* Update coverage

* Fix service descriptions

* Update CODEOWNERS
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2019-02-05 19:31:15 -08:00
1 parent d13b2ca6ef
commit b8cc547fa3
275 files changed
+512 -684

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
"""The test for the Melissa Climate component."""
from tests.common import MockDependency, mock_coro_func
from homeassistant.components import melissa
VALID_CONFIG = {
"melissa": {
"username": "********",
"password": "********",
}
}
async def test_setup(hass):
"""Test setting up the Melissa component."""
with MockDependency('melissa') as mocked_melissa:
mocked_melissa.AsyncMelissa().async_connect = mock_coro_func()
await melissa.async_setup(hass, VALID_CONFIG)
mocked_melissa.AsyncMelissa.assert_called_with(
username="********", password="********")
assert melissa.DATA_MELISSA in hass.data
assert isinstance(hass.data[melissa.DATA_MELISSA], type(
mocked_melissa.AsyncMelissa()))