Fix translation in ovo energy (#129833)

This commit is contained in:
G Johansson 2024-11-04 19:57:49 +01:00 committed by GitHub
parent 90bd9bb626
commit 0b56ef5699
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 19 deletions

View File

@ -1,10 +1,15 @@
{
"config": {
"flow_title": "{username}",
"abort": {
"reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]"
},
"error": {
"already_configured": "[%key:common::config_flow::abort::already_configured_account%]",
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]",
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]"
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"connection_error": "[%key:common::config_flow::error::cannot_connect%]",
"authorization_error": "[%key:common::config_flow::error::invalid_auth%]"
},
"step": {
"user": {

View File

@ -3,7 +3,6 @@
from unittest.mock import patch
import aiohttp
import pytest
from homeassistant import config_entries
from homeassistant.components.ovo_energy.const import CONF_ACCOUNT, DOMAIN
@ -121,10 +120,6 @@ async def test_full_flow_implementation(hass: HomeAssistant) -> None:
assert result2["data"][CONF_ACCOUNT] == FIXTURE_USER_INPUT[CONF_ACCOUNT]
@pytest.mark.parametrize( # Remove when translations fixed
"ignore_translations",
["component.ovo_energy.config.error.authorization_error"],
)
async def test_reauth_authorization_error(hass: HomeAssistant) -> None:
"""Test we show user form on authorization error."""
mock_config = MockConfigEntry(
@ -150,10 +145,6 @@ async def test_reauth_authorization_error(hass: HomeAssistant) -> None:
assert result2["errors"] == {"base": "authorization_error"}
@pytest.mark.parametrize( # Remove when translations fixed
"ignore_translations",
["component.ovo_energy.config.error.connection_error"],
)
async def test_reauth_connection_error(hass: HomeAssistant) -> None:
"""Test we show user form on connection error."""
mock_config = MockConfigEntry(
@ -181,15 +172,6 @@ async def test_reauth_connection_error(hass: HomeAssistant) -> None:
assert result2["errors"] == {"base": "connection_error"}
@pytest.mark.parametrize( # Remove when translations fixed
"ignore_translations",
[
[
"component.ovo_energy.config.abort.reauth_successful",
"component.ovo_energy.config.error.authorization_error",
]
],
)
async def test_reauth_flow(hass: HomeAssistant) -> None:
"""Test reauth works."""
mock_config = MockConfigEntry(