Cleanup ServiceInfo compatibility (#60540)
Co-authored-by: epenet <epenet@users.noreply.github.com> Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
parent
ddd22398f2
commit
141688e210
10 changed files with 1 additions and 412 deletions
|
@ -2380,26 +2380,6 @@ async def test_publish_json_from_template(hass, mqtt_mock):
|
|||
assert mqtt_mock.async_publish.call_args[0][1] == test_str
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("mock_integration_frame")
|
||||
async def test_service_info_compatibility(hass, caplog):
|
||||
"""Test compatibility with old-style dict.
|
||||
|
||||
To be removed in 2022.6
|
||||
"""
|
||||
discovery_info = mqtt.MqttServiceInfo(
|
||||
topic="tasmota/discovery/DC4F220848A2/config",
|
||||
payload="",
|
||||
qos=0,
|
||||
retain=False,
|
||||
subscribed_topic="tasmota/discovery/#",
|
||||
timestamp=None,
|
||||
)
|
||||
|
||||
with patch("homeassistant.helpers.frame._REPORTED_INTEGRATIONS", set()):
|
||||
assert discovery_info["topic"] == "tasmota/discovery/DC4F220848A2/config"
|
||||
assert "Detected integration that accessed discovery_info['topic']" in caplog.text
|
||||
|
||||
|
||||
async def test_subscribe_connection_status(hass, mqtt_mock, mqtt_client_mock):
|
||||
"""Test connextion status subscription."""
|
||||
mqtt_connected_calls = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue