hass-core/tests/components/conftest.py

22 lines
535 B
Python
Raw Normal View History

"""Fixtures for component testing."""
2021-01-01 22:31:56 +01:00
from unittest.mock import patch
import pytest
from homeassistant.components import zeroconf
zeroconf.orig_install_multiple_zeroconf_catcher = (
zeroconf.install_multiple_zeroconf_catcher
)
zeroconf.install_multiple_zeroconf_catcher = lambda zc: None
@pytest.fixture(autouse=True)
def prevent_io():
"""Fixture to prevent certain I/O from happening."""
2019-07-31 12:25:30 -07:00
with patch(
2020-08-27 13:56:20 +02:00
"homeassistant.components.http.ban.async_load_ip_bans_config",
return_value=[],
2019-07-31 12:25:30 -07:00
):
yield