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:
Jan Bouwhuis 2023-02-27 13:54:56 +01:00 committed by GitHub
parent b542f6b3ac
commit b25f6e3ffc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 43 additions and 40 deletions

View file

@ -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