Skip to content

Commit

Permalink
Bump renault-api to 0.1.12 (home-assistant#87773)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet authored and AlePerla committed Feb 10, 2023
1 parent 4c9112b commit 343f85c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion homeassistant/components/renault/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/renault/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions tests/components/renault/test_init.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 343f85c

Please sign in to comment.