Add tests for influxdb and fix a bug

This adds tests for the influxdb component. It also fixes a bug,
where username and password are required, but not gracefully
handled if they're missing from config.
This commit is contained in:
Dan Smith committed 2016-02-12 05:34:13 +00:00
1 parent abc039a3d0
commit 61e2da8827
3 files changed
+174 -2

No files matched your search

+3 -1
View File
@@ -39,7 +39,9 @@ def setup(hass, config):
from influxdb import InfluxDBClient, exceptions
if not validate_config(config, {DOMAIN: ['host']}, _LOGGER):
if not validate_config(config, {DOMAIN: ['host',
CONF_USERNAME,
CONF_PASSWORD]}, _LOGGER):
return False
conf = config[DOMAIN]