1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Migrate to voluptuous (#3142)

🐬
This commit is contained in:
Fabian Affolter
2016-09-02 19:16:42 +02:00
committed by Teagan Glenn
parent a0a509ceea
commit 3bbcf4d8b1
2 changed files with 34 additions and 17 deletions

View File

@@ -2,6 +2,7 @@
import unittest
from homeassistant.components import weblink
from homeassistant import bootstrap
from tests.common import get_test_home_assistant
@@ -17,16 +18,23 @@ class TestComponentWeblink(unittest.TestCase):
"""Stop everything that was started."""
self.hass.stop()
def test_bad_config(self):
"""Test if new entity is created."""
self.assertFalse(bootstrap.setup_component(self.hass, 'weblink', {
'weblink': {
'entities': [{}],
}
}))
def test_entities_get_created(self):
"""Test if new entity is created."""
self.assertTrue(weblink.setup(self.hass, {
weblink.DOMAIN: {
'entities': [
{
weblink.ATTR_NAME: 'My router',
weblink.ATTR_URL: 'http://127.0.0.1/'
weblink.CONF_NAME: 'My router',
weblink.CONF_URL: 'http://127.0.0.1/'
},
{}
]
}
}))