Update wallbox to 0.6.0 (#110636)
* Update wallbox plugin version Closes #110566 * Fix unit tests failing * Fix import order --------- Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
47cbe8f00c
commit
d555f91702
6 changed files with 10 additions and 5 deletions
|
@ -6,5 +6,5 @@
|
|||
"documentation": "https://www.home-assistant.io/integrations/wallbox",
|
||||
"iot_class": "cloud_polling",
|
||||
"loggers": ["wallbox"],
|
||||
"requirements": ["wallbox==0.4.14"]
|
||||
"requirements": ["wallbox==0.6.0"]
|
||||
}
|
||||
|
|
|
@ -2823,7 +2823,7 @@ vultr==0.1.2
|
|||
wakeonlan==2.1.0
|
||||
|
||||
# homeassistant.components.wallbox
|
||||
wallbox==0.4.14
|
||||
wallbox==0.6.0
|
||||
|
||||
# homeassistant.components.folder_watcher
|
||||
watchdog==2.3.1
|
||||
|
|
|
@ -2161,7 +2161,7 @@ vultr==0.1.2
|
|||
wakeonlan==2.1.0
|
||||
|
||||
# homeassistant.components.wallbox
|
||||
wallbox==0.4.14
|
||||
wallbox==0.6.0
|
||||
|
||||
# homeassistant.components.folder_watcher
|
||||
watchdog==2.3.1
|
||||
|
|
|
@ -25,7 +25,7 @@ from homeassistant.components.wallbox.const import (
|
|||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
from .const import ERROR, STATUS, TTL, USER_ID
|
||||
from .const import ERROR, REFRESH_TOKEN_TTL, STATUS, TTL, USER_ID
|
||||
|
||||
from tests.common import MockConfigEntry
|
||||
|
||||
|
@ -72,8 +72,10 @@ authorisation_response = {
|
|||
"data": {
|
||||
"attributes": {
|
||||
"token": "fakekeyhere",
|
||||
"refresh_token": "refresh_fakekeyhere",
|
||||
USER_ID: 12345,
|
||||
TTL: 145656758,
|
||||
REFRESH_TOKEN_TTL: 145756758,
|
||||
ERROR: "false",
|
||||
STATUS: 200,
|
||||
}
|
||||
|
@ -85,8 +87,10 @@ authorisation_response_unauthorised = {
|
|||
"data": {
|
||||
"attributes": {
|
||||
"token": "fakekeyhere",
|
||||
"refresh_token": "refresh_fakekeyhere",
|
||||
USER_ID: 12345,
|
||||
TTL: 145656758,
|
||||
REFRESH_TOKEN_TTL: 145756758,
|
||||
ERROR: "false",
|
||||
STATUS: 404,
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
JWT = "jwt"
|
||||
USER_ID = "user_id"
|
||||
TTL = "ttl"
|
||||
REFRESH_TOKEN_TTL = "refresh_token_ttl"
|
||||
ERROR = "error"
|
||||
STATUS = "status"
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ async def test_form_reauth_invalid(hass: HomeAssistant, entry: MockConfigEntry)
|
|||
with requests_mock.Mocker() as mock_request:
|
||||
mock_request.get(
|
||||
"https://user-api.wall-box.com/users/signin",
|
||||
text='{"jwt":"fakekeyhere","user_id":12345,"ttl":145656758,"error":false,"status":200}',
|
||||
text='{"jwt":"fakekeyhere","refresh_token": "refresh_fakekeyhere","user_id":12345,"ttl":145656758,"refresh_token_ttl":145756758,"error":false,"status":200}',
|
||||
status_code=200,
|
||||
)
|
||||
mock_request.get(
|
||||
|
|
Loading…
Add table
Reference in a new issue