Prepare for refactoring of MQTT related tests (#88557)
* Update mqtt_mock * Tests manual_mqtt * Tests mqtt_json * Tests mqtt_room
This commit is contained in:
parent
b542f6b3ac
commit
b25f6e3ffc
4 changed files with 43 additions and 40 deletions
|
@ -846,12 +846,14 @@ def mqtt_client_mock(hass: HomeAssistant) -> Generator[MqttMockPahoClient, None,
|
|||
@pytest.fixture
|
||||
async def mqtt_mock(
|
||||
hass: HomeAssistant,
|
||||
mock_hass_config: None,
|
||||
mqtt_client_mock: MqttMockPahoClient,
|
||||
mqtt_config_entry_data: dict[str, Any] | None,
|
||||
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||
) -> AsyncGenerator[MqttMockHAClient, None]:
|
||||
"""Fixture to mock MQTT component."""
|
||||
return await mqtt_mock_entry_no_yaml_config()
|
||||
with patch("homeassistant.components.mqtt.PLATFORMS", []):
|
||||
return await mqtt_mock_entry_no_yaml_config()
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue