mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 03:12:20 +01:00
Add variable substitutions for !include (#3510)
This commit is contained in:
13
tests/unit_tests/test_yaml_util.py
Normal file
13
tests/unit_tests/test_yaml_util.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from esphome import yaml_util
|
||||
from esphome.components import substitutions
|
||||
|
||||
|
||||
def test_include_with_vars(fixture_path):
|
||||
yaml_file = fixture_path / "yaml_util" / "includetest.yaml"
|
||||
|
||||
actual = yaml_util.load_yaml(yaml_file)
|
||||
substitutions.do_substitution_pass(actual, None)
|
||||
assert actual["esphome"]["name"] == "original"
|
||||
assert actual["esphome"]["libraries"][0] == "Wire"
|
||||
assert actual["esphome"]["board"] == "nodemcu"
|
||||
assert actual["wifi"]["ssid"] == "my_custom_ssid"
|
Reference in New Issue
Block a user