mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Add another test, revise another. Improve coverage.
This commit is contained in:
parent
d54e10e54a
commit
7c1241c1f8
@ -72,17 +72,25 @@ class TestTemplateSensor:
|
||||
})
|
||||
assert self.hass.states.all() == []
|
||||
|
||||
def test_invalid_config_does_not_create(self):
|
||||
def test_invalid_sensor_does_not_create(self):
|
||||
assert sensor.setup(self.hass, {
|
||||
'sensor': {
|
||||
'platform': 'template',
|
||||
'sensors': {
|
||||
'test_template_sensor': {}
|
||||
'test_template_sensor': 'invalid'
|
||||
}
|
||||
}
|
||||
})
|
||||
assert self.hass.states.all() == []
|
||||
|
||||
def test_no_sensors_does_not_create(self):
|
||||
assert sensor.setup(self.hass, {
|
||||
'sensor': {
|
||||
'platform': 'template'
|
||||
}
|
||||
})
|
||||
assert self.hass.states.all() == []
|
||||
|
||||
def test_missing_template_does_not_create(self):
|
||||
assert sensor.setup(self.hass, {
|
||||
'sensor': {
|
||||
|
Loading…
x
Reference in New Issue
Block a user