mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Fix mqtt tests modifying globals (#105774)
This commit is contained in:
parent
a2b31a06e3
commit
3f2fc2fce9
@ -1,4 +1,5 @@
|
|||||||
"""The tests for the MQTT cover platform."""
|
"""The tests for the MQTT cover platform."""
|
||||||
|
from copy import deepcopy
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
@ -3582,7 +3583,7 @@ async def test_publishing_with_custom_encoding(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Test publishing MQTT payload with different encoding."""
|
"""Test publishing MQTT payload with different encoding."""
|
||||||
domain = cover.DOMAIN
|
domain = cover.DOMAIN
|
||||||
config = DEFAULT_CONFIG
|
config = deepcopy(DEFAULT_CONFIG)
|
||||||
config[mqtt.DOMAIN][domain]["position_topic"] = "some-position-topic"
|
config[mqtt.DOMAIN][domain]["position_topic"] = "some-position-topic"
|
||||||
|
|
||||||
await help_test_publishing_with_custom_encoding(
|
await help_test_publishing_with_custom_encoding(
|
||||||
|
@ -707,7 +707,7 @@ async def test_publishing_with_custom_encoding(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Test publishing MQTT payload with different encoding."""
|
"""Test publishing MQTT payload with different encoding."""
|
||||||
domain = select.DOMAIN
|
domain = select.DOMAIN
|
||||||
config = DEFAULT_CONFIG
|
config = copy.deepcopy(DEFAULT_CONFIG)
|
||||||
config[mqtt.DOMAIN][domain]["options"] = ["milk", "beer"]
|
config[mqtt.DOMAIN][domain]["options"] = ["milk", "beer"]
|
||||||
|
|
||||||
await help_test_publishing_with_custom_encoding(
|
await help_test_publishing_with_custom_encoding(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user