Adding weblink component
Adding weblink component tests
This commit is contained in:
parent
b21be63220
commit
de4dab74b1
2 changed files with 99 additions and 0 deletions
29
tests/components/test_weblink.py
Normal file
29
tests/components/test_weblink.py
Normal file
|
@ -0,0 +1,29 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import unittest
|
||||
|
||||
import homeassistant.core as ha
|
||||
from homeassistant.components import weblink
|
||||
|
||||
|
||||
class TestComponentHistory(unittest.TestCase):
|
||||
""" Tests homeassistant.components.history module. """
|
||||
|
||||
def setUp(self):
|
||||
""" Test setup method. """
|
||||
self.hass = ha.HomeAssistant()
|
||||
|
||||
def tearDown(self):
|
||||
self.hass.stop()
|
||||
|
||||
def test_setup(self):
|
||||
self.assertTrue(weblink.setup(self.hass, {
|
||||
weblink.DOMAIN: {
|
||||
'entities': [
|
||||
{
|
||||
weblink.ATTR_NAME: 'My router',
|
||||
weblink.ATTR_URL: 'http://127.0.0.1/'
|
||||
},
|
||||
{}
|
||||
]
|
||||
}
|
||||
}))
|
Loading…
Add table
Add a link
Reference in a new issue