mirror of
https://github.com/home-assistant/core.git
synced 2025-11-15 22:10:09 +00:00
Bump wallbox to 0.4.9 (#72978)
This commit is contained in:
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user