Fix invalid directory for dnsmasq files in asuswrt (#33503)

pull/33506/head
springstan 2020-04-01 20:04:44 +02:00 committed by GitHub
parent fb93b79b12
commit 0cf9268ca8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -51,7 +51,7 @@ CONFIG_SCHEMA = vol.Schema(
cv.ensure_list, [vol.In(SENSOR_TYPES)] cv.ensure_list, [vol.In(SENSOR_TYPES)]
), ),
vol.Optional(CONF_INTERFACE, default=DEFAULT_INTERFACE): cv.string, vol.Optional(CONF_INTERFACE, default=DEFAULT_INTERFACE): cv.string,
vol.Optional(CONF_DNSMASQ, default=DEFAULT_DNSMASQ): cv.isdir, vol.Optional(CONF_DNSMASQ, default=DEFAULT_DNSMASQ): cv.string,
} }
) )
}, },

View File

@ -19,9 +19,7 @@ async def test_password_or_pub_key_required(hass):
AsusWrt().connection.async_connect = mock_coro_func() AsusWrt().connection.async_connect = mock_coro_func()
AsusWrt().is_connected = False AsusWrt().is_connected = False
result = await async_setup_component( result = await async_setup_component(
hass, hass, DOMAIN, {DOMAIN: {CONF_HOST: "fake_host", CONF_USERNAME: "fake_user"}}
DOMAIN,
{DOMAIN: {CONF_HOST: "fake_host", CONF_USERNAME: "fake_user"}},
) )
assert not result assert not result
@ -62,7 +60,7 @@ async def test_specify_non_directory_path_for_dnsmasq(hass):
CONF_HOST: "fake_host", CONF_HOST: "fake_host",
CONF_USERNAME: "fake_user", CONF_USERNAME: "fake_user",
CONF_PASSWORD: "4321", CONF_PASSWORD: "4321",
CONF_DNSMASQ: "?non_directory?", CONF_DNSMASQ: 1234,
} }
}, },
) )