Fix lutron test AttributeError (#107323)

This commit is contained in:
Marc Mueller 2024-01-06 00:51:17 +01:00 committed by GitHub
parent 49284fb469
commit 133fd6ea5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,5 @@
"""Test the lutron config flow.""" """Test the lutron config flow."""
from email.message import Message
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
from urllib.error import HTTPError from urllib.error import HTTPError
@ -45,7 +46,7 @@ async def test_full_flow(hass: HomeAssistant, mock_setup_entry: AsyncMock) -> No
@pytest.mark.parametrize( @pytest.mark.parametrize(
("raise_error", "text_error"), ("raise_error", "text_error"),
[ [
(HTTPError("", 404, "", None, {}), "cannot_connect"), (HTTPError("", 404, "", Message(), None), "cannot_connect"),
(Exception, "unknown"), (Exception, "unknown"),
], ],
) )