Fix controller not being stored when setup fails and sequentially fails the retry functionality (#17927)

This commit is contained in:
Robert Svensson 2018-10-29 19:09:54 +01:00 committed by Paulus Schoutsen
parent 98dfbf2565
commit b03e6050c5
2 changed files with 7 additions and 6 deletions

View file

@ -54,7 +54,7 @@ async def test_successful_config_entry(hass):
async def test_controller_fail_setup(hass):
"""Test that configured options for a host are loaded via config entry."""
"""Test that a failed setup still stores controller."""
entry = MockConfigEntry(domain=unifi.DOMAIN, data={
'controller': {
'host': '0.0.0.0',
@ -75,7 +75,7 @@ async def test_controller_fail_setup(hass):
controller_id = unifi.CONTROLLER_ID.format(
host='0.0.0.0', site='default'
)
assert controller_id not in hass.data[unifi.DOMAIN]
assert controller_id in hass.data[unifi.DOMAIN]
async def test_controller_no_mac(hass):