mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Convert config.components to a set (#5824)
This commit is contained in:
committed by
Johann Kellerman
parent
f3b9fa2f41
commit
c54517de90
@@ -45,7 +45,7 @@ class TestLightMQTTTemplate(unittest.TestCase):
|
||||
def test_setup_fails(self): \
|
||||
# pylint: disable=invalid-name
|
||||
"""Test that setup fails with missing required configuration items."""
|
||||
self.hass.config.components = ['mqtt']
|
||||
self.hass.config.components = set(['mqtt'])
|
||||
with assert_setup_component(0):
|
||||
assert setup_component(self.hass, light.DOMAIN, {
|
||||
light.DOMAIN: {
|
||||
@@ -58,7 +58,7 @@ class TestLightMQTTTemplate(unittest.TestCase):
|
||||
def test_state_change_via_topic(self): \
|
||||
# pylint: disable=invalid-name
|
||||
"""Test state change via topic."""
|
||||
self.hass.config.components = ['mqtt']
|
||||
self.hass.config.components = set(['mqtt'])
|
||||
with assert_setup_component(1):
|
||||
assert setup_component(self.hass, light.DOMAIN, {
|
||||
light.DOMAIN: {
|
||||
@@ -93,7 +93,7 @@ class TestLightMQTTTemplate(unittest.TestCase):
|
||||
def test_state_brightness_color_effect_change_via_topic(self): \
|
||||
# pylint: disable=invalid-name
|
||||
"""Test state, brightness, color and effect change via topic."""
|
||||
self.hass.config.components = ['mqtt']
|
||||
self.hass.config.components = set(['mqtt'])
|
||||
with assert_setup_component(1):
|
||||
assert setup_component(self.hass, light.DOMAIN, {
|
||||
light.DOMAIN: {
|
||||
@@ -170,7 +170,7 @@ class TestLightMQTTTemplate(unittest.TestCase):
|
||||
def test_optimistic(self): \
|
||||
# pylint: disable=invalid-name
|
||||
"""Test optimistic mode."""
|
||||
self.hass.config.components = ['mqtt']
|
||||
self.hass.config.components = set(['mqtt'])
|
||||
with assert_setup_component(1):
|
||||
assert setup_component(self.hass, light.DOMAIN, {
|
||||
light.DOMAIN: {
|
||||
@@ -232,7 +232,7 @@ class TestLightMQTTTemplate(unittest.TestCase):
|
||||
def test_flash(self): \
|
||||
# pylint: disable=invalid-name
|
||||
"""Test flash."""
|
||||
self.hass.config.components = ['mqtt']
|
||||
self.hass.config.components = set(['mqtt'])
|
||||
with assert_setup_component(1):
|
||||
assert setup_component(self.hass, light.DOMAIN, {
|
||||
light.DOMAIN: {
|
||||
@@ -276,7 +276,7 @@ class TestLightMQTTTemplate(unittest.TestCase):
|
||||
|
||||
def test_transition(self):
|
||||
"""Test for transition time being sent when included."""
|
||||
self.hass.config.components = ['mqtt']
|
||||
self.hass.config.components = set(['mqtt'])
|
||||
with assert_setup_component(1):
|
||||
assert setup_component(self.hass, light.DOMAIN, {
|
||||
light.DOMAIN: {
|
||||
@@ -320,7 +320,7 @@ class TestLightMQTTTemplate(unittest.TestCase):
|
||||
def test_invalid_values(self): \
|
||||
# pylint: disable=invalid-name
|
||||
"""Test that invalid values are ignored."""
|
||||
self.hass.config.components = ['mqtt']
|
||||
self.hass.config.components = set(['mqtt'])
|
||||
with assert_setup_component(1):
|
||||
assert setup_component(self.hass, light.DOMAIN, {
|
||||
light.DOMAIN: {
|
||||
|
||||
Reference in New Issue
Block a user