Preserve customize glob order. (#6963)
* Preserve customize glob order. * add tests
This commit is contained in:
parent
3e66df50c8
commit
f96e06a2c2
4 changed files with 24 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
|||
import os
|
||||
import unittest
|
||||
import unittest.mock as mock
|
||||
from collections import OrderedDict
|
||||
|
||||
import pytest
|
||||
from voluptuous import MultipleInvalid
|
||||
|
@ -205,6 +206,12 @@ class TestConfig(unittest.TestCase):
|
|||
},
|
||||
})
|
||||
|
||||
def test_customize_glob_is_ordered(self):
|
||||
"""Test that customize_glob preserves order."""
|
||||
conf = config_util.CORE_CONFIG_SCHEMA(
|
||||
{'customize_glob': OrderedDict()})
|
||||
self.assertIsInstance(conf['customize_glob'], OrderedDict)
|
||||
|
||||
def _compute_state(self, config):
|
||||
run_coroutine_threadsafe(
|
||||
config_util.async_process_ha_core_config(self.hass, config),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue