Patch out life360 entry setup in tests (#74212)

This commit is contained in:
Franck Nijhof 2022-06-30 02:35:49 +02:00 committed by GitHub
parent 721741281e
commit ab6e92f996
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -118,7 +118,7 @@ async def test_user_show_form(hass, life360_api):
assert keys[keys.index(key)].default == vol.UNDEFINED
async def test_user_config_flow_success(hass, life360_api):
async def test_user_config_flow_success(hass, life360_api, life360):
"""Test a successful user config flow."""
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
@ -228,7 +228,7 @@ async def test_reauth_config_flow_success(hass, life360_api, caplog, state):
assert config_entry.data == TEST_CONFIG_DATA_2
async def test_reauth_config_flow_login_error(hass, life360_api, caplog):
async def test_reauth_config_flow_login_error(hass, life360_api, life360, caplog):
"""Test a reauthorization config flow with a login error."""
config_entry = create_config_entry(hass)
@ -285,7 +285,7 @@ async def test_reauth_config_flow_login_error(hass, life360_api, caplog):
# ========== Option flow Tests =========================================================
async def test_options_flow(hass):
async def test_options_flow(hass, life360):
"""Test an options flow."""
config_entry = create_config_entry(hass)