hass-core/tests/components/conftest.py
Paulus Schoutsen b9aba30a6e
Extract Collection helper from Person integration (#30313)
* Add CRUD foundation

* Use collection helper in person integration

* Lint/pytest

* Add tests

* Lint

* Create notification
2020-01-03 21:37:11 +01:00

16 lines
385 B
Python

"""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."""
with patch(
"homeassistant.components.http.ban.async_load_ip_bans_config",
side_effect=lambda *args: mock_coro([]),
):
yield