fix mqtt siren test asserts (#113550)

This commit is contained in:
Sid 2024-03-15 21:59:30 +01:00 committed by GitHub
parent 397bde4652
commit b261f124d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -832,7 +832,7 @@ async def test_command_templates(
mqtt_mock.async_publish.assert_any_call( mqtt_mock.async_publish.assert_any_call(
"test-topic", "CMD: ON, DURATION: 22, TONE: ping, VOLUME: 0.88", 0, False "test-topic", "CMD: ON, DURATION: 22, TONE: ping, VOLUME: 0.88", 0, False
) )
mqtt_mock.async_publish.call_count == 1 assert mqtt_mock.async_publish.call_count == 1
mqtt_mock.reset_mock() mqtt_mock.reset_mock()
await async_turn_off( await async_turn_off(
hass, hass,
@ -841,7 +841,7 @@ async def test_command_templates(
mqtt_mock.async_publish.assert_any_call( mqtt_mock.async_publish.assert_any_call(
"test-topic", "CMD: OFF, DURATION: , TONE: , VOLUME:", 0, False "test-topic", "CMD: OFF, DURATION: , TONE: , VOLUME:", 0, False
) )
mqtt_mock.async_publish.call_count == 1 assert mqtt_mock.async_publish.call_count == 1
mqtt_mock.reset_mock() mqtt_mock.reset_mock()
await async_turn_on( await async_turn_on(
@ -862,7 +862,7 @@ async def test_command_templates(
entity_id="siren.milk", entity_id="siren.milk",
) )
mqtt_mock.async_publish.assert_any_call("test-topic", "CMD_OFF: OFF", 0, False) mqtt_mock.async_publish.assert_any_call("test-topic", "CMD_OFF: OFF", 0, False)
mqtt_mock.async_publish.call_count == 1 assert mqtt_mock.async_publish.call_count == 2
mqtt_mock.reset_mock() mqtt_mock.reset_mock()