Bump renault-api to 0.1.12 (#87773)

fix https://github.com/hacf-fr/renault-api/pull/789
This commit is contained in:
epenet 2023-02-09 16:55:02 +01:00 committed by GitHub
parent a244f9b202
commit a13535b0c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 6 deletions

View File

@ -1,5 +1,6 @@
"""Support for Renault devices."""
import aiohttp
from renault_api.gigya.exceptions import GigyaException
from homeassistant.config_entries import ConfigEntry
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(
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
if not login_success:

View File

@ -8,5 +8,5 @@
"iot_class": "cloud_polling",
"loggers": ["renault_api"],
"quality_scale": "platinum",
"requirements": ["renault-api==0.1.11"]
"requirements": ["renault-api==0.1.12"]
}

View File

@ -2228,7 +2228,7 @@ raspyrfm-client==1.2.8
regenmaschine==2022.11.0
# homeassistant.components.renault
renault-api==0.1.11
renault-api==0.1.12
# homeassistant.components.reolink
reolink-aio==0.4.0

View File

@ -1573,7 +1573,7 @@ radiotherm==2.1.0
regenmaschine==2022.11.0
# homeassistant.components.renault
renault-api==0.1.11
renault-api==0.1.12
# homeassistant.components.reolink
reolink-aio==0.4.0

View File

@ -1,10 +1,11 @@
"""Tests for Renault setup process."""
from collections.abc import Generator
from typing import Any
from unittest.mock import patch
import aiohttp
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.config_entries import ConfigEntry, ConfigEntryState
@ -58,8 +59,9 @@ async def test_setup_entry_bad_password(
assert not hass.data.get(DOMAIN)
@pytest.mark.parametrize("side_effect", [aiohttp.ClientConnectionError, GigyaException])
async def test_setup_entry_exception(
hass: HomeAssistant, config_entry: ConfigEntry
hass: HomeAssistant, config_entry: ConfigEntry, side_effect: Any
) -> None:
"""Test ConfigEntryNotReady when API raises an exception during entry setup."""
# In this case we are testing the condition where async_setup_entry raises