10000 Cleanup automations yaml by balloob · Pull Request #8223 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Cleanup automations yaml #8223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
from homeassistant.helpers.entity import Entity
from homeassistant.components.config.group import (
CONFIG_PATH as GROUP_CONFIG_PATH)
from homeassistant.components.config.automation import (
CONFIG_PATH as AUTOMATIONS_CONFIG_PATH)

from tests.common import (
get_test_config_dir, get_test_home_assistant, mock_coro)
Expand All @@ -28,6 +30,7 @@
YAML_PATH = os.path.join(CONFIG_DIR, config_util.YAML_CONFIG_FILE)
VERSION_PATH = os.path.join(CONFIG_DIR, config_util.VERSION_FILE)
GROUP_PATH = os.path.join(CONFIG_DIR, GROUP_CONFIG_PATH)
AUTOMATIONS_PATH = os.path.join(CONFIG_DIR, AUTOMATIONS_CONFIG_PATH)
ORIG_TIMEZONE = dt_util.DEFAULT_TIME_ZONE


Expand Down Expand Up @@ -59,6 +62,9 @@ def tearDown(self):
if os.path.isfile(GROUP_PATH):
os.remove(GROUP_PATH)

if os.path.isfile(AUTOMATIONS_PATH):
os.remove(AUTOMATIONS_PATH)

self.hass.stop()

def test_create_default_config(self):
Expand All @@ -68,6 +74,7 @@ def test_create_default_config(self):
assert os.path.isfile(YAML_PATH)
assert os.path.isfile(VERSION_PATH)
assert os.path.isfile(GROUP_PATH)
assert os.path.isfile(AUTOMATIONS_PATH)

def test_find_config_file_yaml(self):
"""Test if it finds a YAML config file."""
Expand Down
0