Bump renault-api to 0.1.12 (#87773)
fix https://github.com/hacf-fr/renault-api/pull/789
This commit is contained in:
parent
a244f9b202
commit
a13535b0c7
5 changed files with 9 additions and 6 deletions
|
@ -1,5 +1,6 @@
|
||||||
"""Support for Renault devices."""
|
"""Support for Renault devices."""
|
||||||
import aiohttp
|
import aiohttp
|
||||||
|
from renault_api.gigya.exceptions import GigyaException
|
||||||
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
|
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
|
||||||
|
@ -18,7 +19,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
|
||||||
login_success = await renault_hub.attempt_login(
|
login_success = await renault_hub.attempt_login(
|
||||||
config_entry.data[CONF_USERNAME], config_entry.data[CONF_PASSWORD]
|
config_entry.data[CONF_USERNAME], config_entry.data[CONF_PASSWORD]
|
||||||
)
|
)
|
||||||
except aiohttp.ClientConnectionError as exc:
|
except (aiohttp.ClientConnectionError, GigyaException) as exc:
|
||||||
raise ConfigEntryNotReady() from exc
|
raise ConfigEntryNotReady() from exc
|
||||||
|
|
||||||
if not login_success:
|
if not login_success:
|
||||||
|
|
|
@ -8,5 +8,5 @@
|
||||||
"iot_class": "cloud_polling",
|
"iot_class": "cloud_polling",
|
||||||
"loggers": ["renault_api"],
|
"loggers": ["renault_api"],
|
||||||
"quality_scale": "platinum",
|
"quality_scale": "platinum",
|
||||||
"requirements": ["renault-api==0.1.11"]
|
"requirements": ["renault-api==0.1.12"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -2228,7 +2228,7 @@ raspyrfm-client==1.2.8
|
||||||
regenmaschine==2022.11.0
|
regenmaschine==2022.11.0
|
||||||
|
|
||||||
# homeassistant.components.renault
|
# homeassistant.components.renault
|
||||||
renault-api==0.1.11
|
renault-api==0.1.12
|
||||||
|
|
||||||
# homeassistant.components.reolink
|
# homeassistant.components.reolink
|
||||||
reolink-aio==0.4.0
|
reolink-aio==0.4.0
|
||||||
|
|
|
@ -1573,7 +1573,7 @@ radiotherm==2.1.0
|
||||||
regenmaschine==2022.11.0
|
regenmaschine==2022.11.0
|
||||||
|
|
||||||
# homeassistant.components.renault
|
# homeassistant.components.renault
|
||||||
renault-api==0.1.11
|
renault-api==0.1.12
|
||||||
|
|
||||||
# homeassistant.components.reolink
|
# homeassistant.components.reolink
|
||||||
reolink-aio==0.4.0
|
reolink-aio==0.4.0
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
"""Tests for Renault setup process."""
|
"""Tests for Renault setup process."""
|
||||||
from collections.abc import Generator
|
from collections.abc import Generator
|
||||||
|
from typing import Any
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
import aiohttp
|
import aiohttp
|
||||||
import pytest
|
import pytest
|
||||||
from renault_api.gigya.exceptions import InvalidCredentialsException
|
from renault_api.gigya.exceptions import GigyaException, InvalidCredentialsException
|
||||||
|
|
||||||
from homeassistant.components.renault.const import DOMAIN
|
from homeassistant.components.renault.const import DOMAIN
|
||||||
from homeassistant.config_entries import ConfigEntry, ConfigEntryState
|
from homeassistant.config_entries import ConfigEntry, ConfigEntryState
|
||||||
|
@ -58,8 +59,9 @@ async def test_setup_entry_bad_password(
|
||||||
assert not hass.data.get(DOMAIN)
|
assert not hass.data.get(DOMAIN)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize("side_effect", [aiohttp.ClientConnectionError, GigyaException])
|
||||||
async def test_setup_entry_exception(
|
async def test_setup_entry_exception(
|
||||||
hass: HomeAssistant, config_entry: ConfigEntry
|
hass: HomeAssistant, config_entry: ConfigEntry, side_effect: Any
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test ConfigEntryNotReady when API raises an exception during entry setup."""
|
"""Test ConfigEntryNotReady when API raises an exception during entry setup."""
|
||||||
# In this case we are testing the condition where async_setup_entry raises
|
# In this case we are testing the condition where async_setup_entry raises
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue