Preserve customize glob order. (#6963)
* Preserve customize glob order. * add tests
This commit is contained in:
1 parent
69dee168a1
commit
5d1dbd61b2
4 files changed
+24
-2
No files matched your search
@@ -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),
|
||||
|
||||
Reference in new issue
Block a user