Prepare MQTT common tests part4 (#90023)
* Upd test_setting_attribute_via_mqtt_json_message * Update test_setting_attribute_with_template * Update test_update_with_json_attrs_not_dict * Update test_update_with_json_attrs_bad_json
This commit is contained in:
parent
dd1700954b
commit
fe49861e26
21 changed files with 168 additions and 171 deletions
|
@ -1061,11 +1061,11 @@ async def test_custom_availability_payload(
|
|||
|
||||
|
||||
async def test_setting_attribute_via_mqtt_json_message(
|
||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
||||
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||
) -> None:
|
||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||
await help_test_setting_attribute_via_mqtt_json_message(
|
||||
hass, mqtt_mock_entry_with_yaml_config, humidifier.DOMAIN, DEFAULT_CONFIG
|
||||
hass, mqtt_mock_entry_no_yaml_config, humidifier.DOMAIN, DEFAULT_CONFIG
|
||||
)
|
||||
|
||||
|
||||
|
@ -1083,23 +1083,23 @@ async def test_setting_blocked_attribute_via_mqtt_json_message(
|
|||
|
||||
|
||||
async def test_setting_attribute_with_template(
|
||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
||||
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||
) -> None:
|
||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||
await help_test_setting_attribute_with_template(
|
||||
hass, mqtt_mock_entry_with_yaml_config, humidifier.DOMAIN, DEFAULT_CONFIG
|
||||
hass, mqtt_mock_entry_no_yaml_config, humidifier.DOMAIN, DEFAULT_CONFIG
|
||||
)
|
||||
|
||||
|
||||
async def test_update_with_json_attrs_not_dict(
|
||||
hass: HomeAssistant,
|
||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
||||
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||
caplog: pytest.LogCaptureFixture,
|
||||
) -> None:
|
||||
"""Test attributes get extracted from a JSON result."""
|
||||
await help_test_update_with_json_attrs_not_dict(
|
||||
hass,
|
||||
mqtt_mock_entry_with_yaml_config,
|
||||
mqtt_mock_entry_no_yaml_config,
|
||||
caplog,
|
||||
humidifier.DOMAIN,
|
||||
DEFAULT_CONFIG,
|
||||
|
@ -1108,13 +1108,13 @@ async def test_update_with_json_attrs_not_dict(
|
|||
|
||||
async def test_update_with_json_attrs_bad_json(
|
||||
hass: HomeAssistant,
|
||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
||||
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||
caplog: pytest.LogCaptureFixture,
|
||||
) -> None:
|
||||
"""Test attributes get extracted from a JSON result."""
|
||||
await help_test_update_with_json_attrs_bad_json(
|
||||
hass,
|
||||
mqtt_mock_entry_with_yaml_config,
|
||||
mqtt_mock_entry_no_yaml_config,
|
||||
caplog,
|
||||
humidifier.DOMAIN,
|
||||
DEFAULT_CONFIG,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue