Fix test with time issue for xiaomi_miio button (#95438)

This commit is contained in:
Jan Bouwhuis 2023-06-28 13:19:24 +02:00 committed by GitHub
parent fe7857c8ec
commit 8b6ed9c6b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,6 +52,7 @@ async def test_vacuum_button_params(hass: HomeAssistant) -> None:
assert state.state == "unknown"
@pytest.mark.freeze_time("2023-06-28 00:00:00+00:00")
async def test_vacuum_button_press(hass: HomeAssistant) -> None:
"""Test pressing a vacuum button."""
@ -71,7 +72,7 @@ async def test_vacuum_button_press(hass: HomeAssistant) -> None:
state = hass.states.get(f"{entity_id}_reset_side_brush")
assert state
assert state.state[0:21] == pressed_at.isoformat()[0:21] # drop millisecs
assert state.state == pressed_at.isoformat()
async def setup_component(hass: HomeAssistant, entity_name: str) -> str: