* add config flow * fix pylint * update lib * Update config_flow.py * remote devices layer in config * add default host * avoid double setups of entities * remove async_setup_platform * store entities in hass.data * pass fritz connection together with config_entry * fritz connections try no4 (or is it even more) * fix comments * add unloading * fixed comments * Update config_flow.py * Update const.py * Update config_flow.py * Update __init__.py * Update config_flow.py * Update __init__.py * Update __init__.py * Update config_flow.py * Update __init__.py * Update __init__.py * Update __init__.py * Update config_flow.py * add init tests * test unloading * add switch tests * add sensor tests * add climate tests * test target temperature * mock config to package * comments * test binary sensor state * add config flow tests * comments * add missing tests * minor * remove string title * deprecate yaml * don't change yaml * get devices async * minor * add devices again * comments fixed * unique_id fixes * fix patches * Fix schema Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
14 lines
486 B
Python
14 lines
486 B
Python
"""Fixtures for the AVM Fritz!Box integration."""
|
|
from unittest.mock import Mock, patch
|
|
|
|
import pytest
|
|
|
|
|
|
@pytest.fixture(name="fritz")
|
|
def fritz_fixture() -> Mock:
|
|
"""Patch libraries."""
|
|
with patch("homeassistant.components.fritzbox.socket") as socket, patch(
|
|
"homeassistant.components.fritzbox.Fritzhome"
|
|
) as fritz, patch("homeassistant.components.fritzbox.config_flow.Fritzhome"):
|
|
socket.gethostbyname.return_value = "FAKE_IP_ADDRESS"
|
|
yield fritz
|