Working on igd
This commit is contained in:
1 parent
50f63ed4c5
commit
8bec4a55d1
10 files changed
+206
-231
No files matched your search
@@ -10,6 +10,9 @@ async def test_flow_none_discovered(hass):
|
||||
"""Test no device discovered flow."""
|
||||
flow = igd_config_flow.IgdFlowHandler()
|
||||
flow.hass = hass
|
||||
hass.data[igd.DOMAIN] = {
|
||||
'discovered': {}
|
||||
}
|
||||
|
||||
result = await flow.async_step_user()
|
||||
assert result['type'] == 'abort'
|
||||
|
||||
@@ -93,7 +93,7 @@ async def test_async_setup_entry_default(hass):
|
||||
hass.bus.async_fire(EVENT_HOMEASSISTANT_STOP)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert hass.data[igd.DOMAIN]['devices'][udn] is None
|
||||
assert udn not in hass.data[igd.DOMAIN]['devices']
|
||||
assert len(mock_igd_device.async_add_port_mapping.mock_calls) == 0
|
||||
assert len(mock_igd_device.async_delete_port_mapping.mock_calls) == 0
|
||||
|
||||
@@ -128,6 +128,6 @@ async def test_async_setup_entry_port_forward(hass):
|
||||
hass.bus.async_fire(EVENT_HOMEASSISTANT_STOP)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert hass.data[igd.DOMAIN]['devices'][udn] is None
|
||||
assert udn not in hass.data[igd.DOMAIN]['devices']
|
||||
assert len(mock_igd_device.async_add_port_mapping.mock_calls) > 0
|
||||
assert len(mock_igd_device.async_delete_port_mapping.mock_calls) > 0
|
||||
Reference in new issue
Block a user