Use common strings for Panasonic Viera (#41268)

* Update strings.json

* Update config_flow.py

* Update homeassistant/components/panasonic_viera/strings.json

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/panasonic_viera/strings.json

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Fix failed tests

* revert line 530

* Fix remaining error key

* Remove not needed import

* Update const.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
TopdRobandMartin Hjelmare authored and GitHub committed 2020-10-06 14:07:38 +02:00
1 parent 356ebc1128
commit 888c92aa5e
4 files changed
+18 -28

No files matched your search

@@ -11,9 +11,6 @@ from homeassistant.components.panasonic_viera.const import (
DEFAULT_PORT,
DOMAIN,
ERROR_INVALID_PIN_CODE,
ERROR_NOT_CONNECTED,
REASON_NOT_CONNECTED,
REASON_UNKNOWN,
)
from homeassistant.const import CONF_HOST, CONF_NAME, CONF_PIN, CONF_PORT
@@ -116,7 +113,7 @@ async def test_flow_not_connected_error(hass):
assert result["type"] == "form"
assert result["step_id"] == "user"
assert result["errors"] == {"base": ERROR_NOT_CONNECTED}
assert result["errors"] == {"base": "cannot_connect"}
async def test_flow_unknown_abort(hass):
@@ -139,7 +136,7 @@ async def test_flow_unknown_abort(hass):
)
assert result["type"] == "abort"
assert result["reason"] == REASON_UNKNOWN
assert result["reason"] == "unknown"
async def test_flow_encrypted_valid_pin_code(hass):
@@ -255,7 +252,7 @@ async def test_flow_encrypted_not_connected_abort(hass):
)
assert result["type"] == "abort"
assert result["reason"] == REASON_NOT_CONNECTED
assert result["reason"] == "cannot_connect"
async def test_flow_encrypted_unknown_abort(hass):
@@ -288,7 +285,7 @@ async def test_flow_encrypted_unknown_abort(hass):
)
assert result["type"] == "abort"
assert result["reason"] == REASON_UNKNOWN
assert result["reason"] == "unknown"
async def test_flow_non_encrypted_already_configured_abort(hass):
@@ -475,7 +472,7 @@ async def test_imported_flow_encrypted_not_connected_abort(hass):
)
assert result["type"] == "abort"
assert result["reason"] == REASON_NOT_CONNECTED
assert result["reason"] == "cannot_connect"
async def test_imported_flow_encrypted_unknown_abort(hass):
@@ -507,7 +504,7 @@ async def test_imported_flow_encrypted_unknown_abort(hass):
)
assert result["type"] == "abort"
assert result["reason"] == REASON_UNKNOWN
assert result["reason"] == "unknown"
async def test_imported_flow_not_connected_error(hass):
@@ -530,7 +527,7 @@ async def test_imported_flow_not_connected_error(hass):
assert result["type"] == "form"
assert result["step_id"] == "user"
assert result["errors"] == {"base": ERROR_NOT_CONNECTED}
assert result["errors"] == {"base": "cannot_connect"}
async def test_imported_flow_unknown_abort(hass):
@@ -552,7 +549,7 @@ async def test_imported_flow_unknown_abort(hass):
)
assert result["type"] == "abort"
assert result["reason"] == REASON_UNKNOWN
assert result["reason"] == "unknown"
async def test_imported_flow_non_encrypted_already_configured_abort(hass):