Add tls support for AVM Fritz!Tools (#112714)
This commit is contained in:
parent
b450918f66
commit
68225abce5
9 changed files with 210 additions and 51 deletions
|
@ -74,16 +74,6 @@ class FritzConnectionMock:
|
|||
return self._services[service][action]
|
||||
|
||||
|
||||
class FritzHostMock(FritzHosts):
|
||||
"""FritzHosts mocking."""
|
||||
|
||||
get_mesh_topology = MagicMock()
|
||||
get_mesh_topology.return_value = MOCK_MESH_DATA
|
||||
|
||||
get_hosts_attributes = MagicMock()
|
||||
get_hosts_attributes.return_value = MOCK_HOST_ATTRIBUTES_DATA
|
||||
|
||||
|
||||
@pytest.fixture(name="fc_data")
|
||||
def fc_data_mock():
|
||||
"""Fixture for default fc_data."""
|
||||
|
@ -105,6 +95,8 @@ def fh_class_mock():
|
|||
"""Fixture that sets up a mocked FritzHosts class."""
|
||||
with patch(
|
||||
"homeassistant.components.fritz.common.FritzHosts",
|
||||
new=FritzHostMock,
|
||||
new=FritzHosts,
|
||||
) as result:
|
||||
result.get_mesh_topology = MagicMock(return_value=MOCK_MESH_DATA)
|
||||
result.get_hosts_attributes = MagicMock(return_value=MOCK_HOST_ATTRIBUTES_DATA)
|
||||
yield result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue