mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Use dataclass instead of attr slots for mqtt PublishMessage and ReceiveMessage (#101062)
Use dataclass instead of attr slots
This commit is contained in:
@ -2085,7 +2085,9 @@ async def test_handle_message_callback(
|
||||
callbacks.append(args)
|
||||
|
||||
mock_mqtt = await mqtt_mock_entry()
|
||||
msg = ReceiveMessage("some-topic", b"test-payload", 1, False)
|
||||
msg = ReceiveMessage(
|
||||
"some-topic", b"test-payload", 1, False, "some-topic", datetime.now()
|
||||
)
|
||||
mqtt_client_mock.on_connect(mqtt_client_mock, None, None, 0)
|
||||
await mqtt.async_subscribe(hass, "some-topic", _callback)
|
||||
mqtt_client_mock.on_message(mock_mqtt, None, msg)
|
||||
|
Reference in New Issue
Block a user