Use common strings in opentherm_gw config flow (#42211)
* Use common strings in opentherm_gw config flow * Combine TimeourError and SerialException handling * Fixed test_form_connection_error * And then fix the flake8 error... * Change "timeout" to "cannot_connect" msg
This commit is contained in:
@@ -148,7 +148,7 @@ async def test_form_connection_timeout(hass):
|
||||
)
|
||||
|
||||
assert result2["type"] == "form"
|
||||
assert result2["errors"] == {"base": "timeout"}
|
||||
assert result2["errors"] == {"base": "cannot_connect"}
|
||||
assert len(mock_connect.mock_calls) == 1
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ async def test_form_connection_error(hass):
|
||||
)
|
||||
|
||||
assert result2["type"] == "form"
|
||||
assert result2["errors"] == {"base": "serial_error"}
|
||||
assert result2["errors"] == {"base": "cannot_connect"}
|
||||
assert len(mock_connect.mock_calls) == 1
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user