Initial support for Config Entries (#12079)

* Introduce Config Entries

* Rebase fail

* Address comments

* Address more comments

* RequestDataValidator moved
This commit is contained in:
Paulus Schoutsen 2018-02-16 14:07:38 -08:00 committed by GitHub
parent 2053c8a908
commit b3a47722f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 1622 additions and 29 deletions

View file

@ -3,7 +3,6 @@ import unittest
from homeassistant.const import (STATE_ON, STATE_OFF)
from homeassistant.components.binary_sensor import command_line
from homeassistant import setup
from homeassistant.helpers import template
from tests.common import get_test_home_assistant
@ -42,16 +41,6 @@ class TestCommandSensorBinarySensor(unittest.TestCase):
self.assertEqual('Test', entity.name)
self.assertEqual(STATE_ON, entity.state)
def test_setup_bad_config(self):
"""Test the setup with a bad configuration."""
config = {'name': 'test',
'platform': 'not_command_line',
}
self.assertFalse(setup.setup_component(self.hass, 'test', {
'command_line': config,
}))
def test_template(self):
"""Test setting the state with a template."""
data = command_line.CommandSensorData(self.hass, 'echo 10')