mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Add missing mock in filesize config flow tests (#89441)
This commit is contained in:
parent
4e4608183e
commit
f3084165b1
@ -1,6 +1,8 @@
|
||||
"""Tests for the Filesize config flow."""
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
from homeassistant.components.filesize.const import DOMAIN
|
||||
from homeassistant.config_entries import SOURCE_USER
|
||||
from homeassistant.const import CONF_FILE_PATH
|
||||
@ -11,6 +13,8 @@ from . import TEST_DIR, TEST_FILE, TEST_FILE_NAME, async_create_file
|
||||
|
||||
from tests.common import MockConfigEntry
|
||||
|
||||
pytestmark = pytest.mark.usefixtures("mock_setup_entry")
|
||||
|
||||
|
||||
async def test_full_user_flow(hass: HomeAssistant) -> None:
|
||||
"""Test the full user configuration flow."""
|
||||
@ -75,9 +79,6 @@ async def test_flow_fails_on_validation(hass: HomeAssistant) -> None:
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.filesize.config_flow.pathlib.Path",
|
||||
), patch(
|
||||
"homeassistant.components.filesize.async_setup_entry",
|
||||
return_value=True,
|
||||
):
|
||||
result2 = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
@ -91,9 +92,6 @@ async def test_flow_fails_on_validation(hass: HomeAssistant) -> None:
|
||||
hass.config.allowlist_external_dirs = {TEST_DIR}
|
||||
with patch(
|
||||
"homeassistant.components.filesize.config_flow.pathlib.Path",
|
||||
), patch(
|
||||
"homeassistant.components.filesize.async_setup_entry",
|
||||
return_value=True,
|
||||
):
|
||||
result2 = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
|
Loading…
x
Reference in New Issue
Block a user