added root path for ha

This commit is contained in:
Ari Sosnovsky committed 2021-11-11 12:41:10 -05:00
1 parent c493c0a3d0
commit 3c082608f8
4 files changed
+19 -4

No files matched your search

+5 -1
View File
@@ -1,3 +1,4 @@
from pathlib import Path
from tempfile import mkdtemp
from unittest import TestCase
from src.config.AutomationLoader import (
@@ -26,7 +27,7 @@ class config_finder_tests(TestCase):
pass
def test_find_sample_config(self):
secrets, config = load_hass_config(SAMPLE_HA_PATH)
secrets, config, file_path = load_hass_config(SAMPLE_HA_PATH)
self.assertIsInstance(config["template"], IncludedYaml)
self.assertIsInstance(config["binary_sensor"], IncludedYaml)
self.assertIsInstance(config["group"], IncludedYaml)
@@ -36,6 +37,7 @@ class config_finder_tests(TestCase):
config["automation"].data[32]["trigger"][0]["device_id"],
SecretValue("baby_btn_device_id", "347492ffc6b909a55ebe08745fca1bf6"),
)
self.assertEqual(file_path, SAMPLE_HA_PATH / "configuration.yaml")
class AutomationLoader_tests(TestCase):
@@ -324,6 +326,7 @@ class AutomationLoader_tests(TestCase):
config={
"automation": "bob",
},
root_config_path=Path("."),
)
)
@@ -332,5 +335,6 @@ class AutomationLoader_tests(TestCase):
HassConfig(
secrets={},
config={},
root_config_path=Path("."),
)
)