core/tests/components/conftest.py

17 lines
385 B
Python
Raw Normal View History

"""Fixtures for component testing."""
from unittest.mock import patch
import pytest
from tests.common import mock_coro
@pytest.fixture(autouse=True)
def prevent_io():
"""Fixture to prevent certain I/O from happening."""
2019-07-31 19:25:30 +00:00
with patch(
"homeassistant.components.http.ban.async_load_ip_bans_config",
side_effect=lambda *args: mock_coro([]),
):
yield