Migrate to voluptuous (#3142)

🐬
This commit is contained in:
Fabian Affolter authored and Teagan Glenn committed 2016-09-02 11:16:42 -06:00
1 parent a0a509ceea
commit 3bbcf4d8b1
2 files changed
+34 -17

No files matched your search

+11 -3
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/'
},
{}
]
}
}))