mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Update byte string formatting (#112752)
This commit is contained in:
@ -748,11 +748,11 @@ def test_validate_topic() -> None:
|
||||
with pytest.raises(vol.Invalid):
|
||||
mqtt.util.valid_topic("\u0001")
|
||||
with pytest.raises(vol.Invalid):
|
||||
mqtt.util.valid_topic("\u001F")
|
||||
mqtt.util.valid_topic("\u001f")
|
||||
with pytest.raises(vol.Invalid):
|
||||
mqtt.util.valid_topic("\u007F")
|
||||
mqtt.util.valid_topic("\u007f")
|
||||
with pytest.raises(vol.Invalid):
|
||||
mqtt.util.valid_topic("\u009F")
|
||||
mqtt.util.valid_topic("\u009f")
|
||||
with pytest.raises(vol.Invalid):
|
||||
mqtt.util.valid_topic("\ufdd0")
|
||||
with pytest.raises(vol.Invalid):
|
||||
@ -2723,7 +2723,7 @@ async def test_mqtt_ws_subscription(
|
||||
|
||||
async_fire_mqtt_message(hass, "test-topic", "test1")
|
||||
async_fire_mqtt_message(hass, "test-topic", "test2")
|
||||
async_fire_mqtt_message(hass, "test-topic", b"\xDE\xAD\xBE\xEF")
|
||||
async_fire_mqtt_message(hass, "test-topic", b"\xde\xad\xbe\xef")
|
||||
|
||||
response = await client.receive_json()
|
||||
assert response["event"]["topic"] == "test-topic"
|
||||
@ -2751,7 +2751,7 @@ async def test_mqtt_ws_subscription(
|
||||
|
||||
async_fire_mqtt_message(hass, "test-topic", "test1", 2)
|
||||
async_fire_mqtt_message(hass, "test-topic", "test2", 2)
|
||||
async_fire_mqtt_message(hass, "test-topic", b"\xDE\xAD\xBE\xEF", 2)
|
||||
async_fire_mqtt_message(hass, "test-topic", b"\xde\xad\xbe\xef", 2)
|
||||
|
||||
response = await client.receive_json()
|
||||
assert response["event"]["topic"] == "test-topic"
|
||||
|
Reference in New Issue
Block a user