mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Add config flow and device registry to fritzbox integration (#31240)
* 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>
This commit is contained in:
14
tests/components/fritzbox/conftest.py
Normal file
14
tests/components/fritzbox/conftest.py
Normal file
@@ -0,0 +1,14 @@
|
||||
"""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
|
||||
Reference in New Issue
Block a user