mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Update ruff to 0.12.0 (#147106)
This commit is contained in:
@ -683,11 +683,9 @@ async def test_receiving_message_with_non_utf8_topic_gets_logged(
|
||||
# Local import to avoid processing MQTT modules when running a testcase
|
||||
# which does not use MQTT.
|
||||
|
||||
# pylint: disable-next=import-outside-toplevel
|
||||
from paho.mqtt.client import MQTTMessage
|
||||
from paho.mqtt.client import MQTTMessage # noqa: PLC0415
|
||||
|
||||
# pylint: disable-next=import-outside-toplevel
|
||||
from homeassistant.components.mqtt.models import MqttData
|
||||
from homeassistant.components.mqtt.models import MqttData # noqa: PLC0415
|
||||
|
||||
msg = MQTTMessage(topic=b"tasmota/discovery/18FE34E0B760\xcc\x02")
|
||||
msg.payload = b"Payload"
|
||||
@ -1001,10 +999,9 @@ async def test_dump_service(
|
||||
async_fire_time_changed(hass, utcnow() + timedelta(seconds=3))
|
||||
await hass.async_block_till_done()
|
||||
|
||||
writes = mopen.return_value.write.mock_calls
|
||||
assert len(writes) == 2
|
||||
assert writes[0][1][0] == "bla/1,test1\n"
|
||||
assert writes[1][1][0] == "bla/2,test2\n"
|
||||
writes = mopen.return_value.writelines.mock_calls
|
||||
assert len(writes) == 1
|
||||
assert writes[0][1][0] == ["bla/1,test1\n", "bla/2,test2\n"]
|
||||
|
||||
|
||||
async def test_mqtt_ws_remove_discovered_device(
|
||||
|
Reference in New Issue
Block a user