mirror of
https://github.com/home-assistant/core.git
synced 2026-11-29 01:02:03 -04:00
Address FireServiceRota late code review (#43741)
* Address review comment from PR #38206 * Address review comment from PR #43638 * Address review comment from PR #43700 * isort fixed * Better code for duty entity update * Removed all pylint relative-beyond-top-level * Removed logger entry from entity state method
This commit is contained in:
@@ -2,9 +2,7 @@
|
||||
from pyfireservicerota import InvalidAuthError
|
||||
|
||||
from homeassistant import data_entry_flow
|
||||
from homeassistant.components.fireservicerota.const import ( # pylint: disable=unused-import
|
||||
DOMAIN,
|
||||
)
|
||||
from homeassistant.components.fireservicerota.const import DOMAIN
|
||||
from homeassistant.const import CONF_PASSWORD, CONF_URL, CONF_USERNAME
|
||||
|
||||
from tests.async_mock import patch
|
||||
@@ -16,7 +14,6 @@ MOCK_CONF = {
|
||||
CONF_URL: "www.brandweerrooster.nl",
|
||||
}
|
||||
|
||||
|
||||
MOCK_DATA = {
|
||||
"auth_implementation": DOMAIN,
|
||||
CONF_URL: MOCK_CONF[CONF_URL],
|
||||
@@ -79,14 +76,14 @@ async def test_step_user(hass):
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.fireservicerota.config_flow.FireServiceRota"
|
||||
) as MockFireServiceRota, patch(
|
||||
) as mock_fsr, patch(
|
||||
"homeassistant.components.fireservicerota.async_setup", return_value=True
|
||||
) as mock_setup, patch(
|
||||
"homeassistant.components.fireservicerota.async_setup_entry",
|
||||
return_value=True,
|
||||
) as mock_setup_entry:
|
||||
|
||||
mock_fireservicerota = MockFireServiceRota.return_value
|
||||
mock_fireservicerota = mock_fsr.return_value
|
||||
mock_fireservicerota.request_tokens.return_value = MOCK_TOKEN_INFO
|
||||
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
|
||||
Reference in New Issue
Block a user