Drop use of async_mock_mqtt_component (#37011)
This commit is contained in:
1 parent
a2e2c35011
commit
280f49540e
25 files changed
+126
-209
No files matched your search
@@ -30,17 +30,16 @@ from .test_common import (
|
||||
help_test_update_with_json_attrs_not_dict,
|
||||
)
|
||||
|
||||
from tests.common import async_fire_mqtt_message, async_mock_mqtt_component
|
||||
from tests.common import async_fire_mqtt_message
|
||||
|
||||
DEFAULT_CONFIG = {
|
||||
camera.DOMAIN: {"platform": "mqtt", "name": "test", "topic": "test_topic"}
|
||||
}
|
||||
|
||||
|
||||
async def test_run_camera_setup(hass, aiohttp_client):
|
||||
async def test_run_camera_setup(hass, aiohttp_client, mqtt_mock):
|
||||
"""Test that it fetches the given payload."""
|
||||
topic = "test/camera"
|
||||
await async_mock_mqtt_component(hass)
|
||||
await async_setup_component(
|
||||
hass,
|
||||
"camera",
|
||||
@@ -122,7 +121,7 @@ async def test_discovery_update_attr(hass, mqtt_mock, caplog):
|
||||
)
|
||||
|
||||
|
||||
async def test_unique_id(hass):
|
||||
async def test_unique_id(hass, mqtt_mock):
|
||||
"""Test unique id option only creates one camera per unique_id."""
|
||||
config = {
|
||||
camera.DOMAIN: [
|
||||
@@ -140,7 +139,7 @@ async def test_unique_id(hass):
|
||||
},
|
||||
]
|
||||
}
|
||||
await help_test_unique_id(hass, camera.DOMAIN, config)
|
||||
await help_test_unique_id(hass, mqtt_mock, camera.DOMAIN, config)
|
||||
|
||||
|
||||
async def test_discovery_removal_camera(hass, mqtt_mock, caplog):
|
||||
|
||||
Reference in new issue
Block a user