Use set literals in tests (#33669)
This commit is contained in:
1 parent
d267d674b9
commit
03dd92d51b
9 files changed
+24
-28
No files matched your search
@@ -43,7 +43,7 @@ async def test_new_message(hass, mock_device_tracker_conf):
|
||||
topic = "/location/paulus"
|
||||
location = "work"
|
||||
|
||||
hass.config.components = set(["mqtt", "zone"])
|
||||
hass.config.components = {"mqtt", "zone"}
|
||||
assert await async_setup_component(
|
||||
hass, DOMAIN, {DOMAIN: {CONF_PLATFORM: "mqtt", "devices": {dev_id: topic}}}
|
||||
)
|
||||
@@ -60,7 +60,7 @@ async def test_single_level_wildcard_topic(hass, mock_device_tracker_conf):
|
||||
topic = "/location/room/paulus"
|
||||
location = "work"
|
||||
|
||||
hass.config.components = set(["mqtt", "zone"])
|
||||
hass.config.components = {"mqtt", "zone"}
|
||||
assert await async_setup_component(
|
||||
hass,
|
||||
DOMAIN,
|
||||
@@ -79,7 +79,7 @@ async def test_multi_level_wildcard_topic(hass, mock_device_tracker_conf):
|
||||
topic = "/location/room/paulus"
|
||||
location = "work"
|
||||
|
||||
hass.config.components = set(["mqtt", "zone"])
|
||||
hass.config.components = {"mqtt", "zone"}
|
||||
assert await async_setup_component(
|
||||
hass,
|
||||
DOMAIN,
|
||||
@@ -98,7 +98,7 @@ async def test_single_level_wildcard_topic_not_matching(hass, mock_device_tracke
|
||||
topic = "/location/paulus"
|
||||
location = "work"
|
||||
|
||||
hass.config.components = set(["mqtt", "zone"])
|
||||
hass.config.components = {"mqtt", "zone"}
|
||||
assert await async_setup_component(
|
||||
hass,
|
||||
DOMAIN,
|
||||
@@ -117,7 +117,7 @@ async def test_multi_level_wildcard_topic_not_matching(hass, mock_device_tracker
|
||||
topic = "/somewhere/room/paulus"
|
||||
location = "work"
|
||||
|
||||
hass.config.components = set(["mqtt", "zone"])
|
||||
hass.config.components = {"mqtt", "zone"}
|
||||
assert await async_setup_component(
|
||||
hass,
|
||||
DOMAIN,
|
||||
@@ -138,7 +138,7 @@ async def test_matching_custom_payload_for_home_and_not_home(
|
||||
payload_home = "present"
|
||||
payload_not_home = "not present"
|
||||
|
||||
hass.config.components = set(["mqtt", "zone"])
|
||||
hass.config.components = {"mqtt", "zone"}
|
||||
assert await async_setup_component(
|
||||
hass,
|
||||
DOMAIN,
|
||||
@@ -171,7 +171,7 @@ async def test_not_matching_custom_payload_for_home_and_not_home(
|
||||
payload_not_home = "not present"
|
||||
payload_not_matching = "test"
|
||||
|
||||
hass.config.components = set(["mqtt", "zone"])
|
||||
hass.config.components = {"mqtt", "zone"}
|
||||
assert await async_setup_component(
|
||||
hass,
|
||||
DOMAIN,
|
||||
@@ -198,7 +198,7 @@ async def test_matching_source_type(hass, mock_device_tracker_conf):
|
||||
source_type = SOURCE_TYPE_BLUETOOTH
|
||||
location = "work"
|
||||
|
||||
hass.config.components = set(["mqtt", "zone"])
|
||||
hass.config.components = {"mqtt", "zone"}
|
||||
assert await async_setup_component(
|
||||
hass,
|
||||
DOMAIN,
|
||||
|
||||
Reference in new issue
Block a user