Fix clean tests

This commit is contained in:
Steven B 2025-01-21 14:02:59 +00:00
parent 305e732238
commit 7e619fcb7e
No known key found for this signature in database
GPG Key ID: 6D5B46B3679F2A43

View File

@ -117,6 +117,10 @@ async def test_actions(
async def test_post_update_hook(dev: SmartDevice, err_status: list, error: ErrorCode): async def test_post_update_hook(dev: SmartDevice, err_status: list, error: ErrorCode):
"""Test that post update hook sets error states correctly.""" """Test that post update hook sets error states correctly."""
clean = next(get_parent_and_child_modules(dev, Module.Clean)) clean = next(get_parent_and_child_modules(dev, Module.Clean))
assert clean
# _post_update_hook will pop an item off the status list so create a copy.
err_status = [e for e in err_status]
clean.data["getVacStatus"]["err_status"] = err_status clean.data["getVacStatus"]["err_status"] = err_status
await clean._post_update_hook() await clean._post_update_hook()