Bump wallbox to 0.4.9 (#72978)

This commit is contained in:
hesselonline
2022-06-06 03:31:09 +02:00
committed by GitHub
parent 7f0091280f
commit 9ea504dd7b
9 changed files with 61 additions and 128 deletions

View File

@@ -11,24 +11,12 @@ from . import test_response
from tests.components.wallbox import (
DOMAIN,
authorisation_response,
entry,
setup_integration,
setup_integration_connection_error,
setup_integration_read_only,
)
from tests.components.wallbox.const import ERROR, JWT, STATUS, TTL, USER_ID
authorisation_response = json.loads(
json.dumps(
{
JWT: "fakekeyhere",
USER_ID: 12345,
TTL: 145656758,
ERROR: "false",
STATUS: 200,
}
)
)
async def test_wallbox_setup_unload_entry(hass: HomeAssistant) -> None:
@@ -59,7 +47,7 @@ async def test_wallbox_refresh_failed_invalid_auth(hass: HomeAssistant) -> None:
with requests_mock.Mocker() as mock_request:
mock_request.get(
"https://api.wall-box.com/auth/token/user",
"https://user-api.wall-box.com/users/signin",
json=authorisation_response,
status_code=403,
)
@@ -85,7 +73,7 @@ async def test_wallbox_refresh_failed_connection_error(hass: HomeAssistant) -> N
with requests_mock.Mocker() as mock_request:
mock_request.get(
"https://api.wall-box.com/auth/token/user",
"https://user-api.wall-box.com/users/signin",
json=authorisation_response,
status_code=200,
)