Convert config.components to a set (#5824)
This commit is contained in:
1 parent
f3b9fa2f41
commit
c54517de90
44 files changed
+118
-104
No files matched your search
@@ -235,13 +235,17 @@ class TestAPI(unittest.TestCase):
|
||||
"""Test the return of the configuration."""
|
||||
req = requests.get(_url(const.URL_API_CONFIG),
|
||||
headers=HA_HEADERS)
|
||||
self.assertEqual(hass.config.as_dict(), req.json())
|
||||
result = req.json()
|
||||
if 'components' in result:
|
||||
result['components'] = set(result['components'])
|
||||
|
||||
self.assertEqual(hass.config.as_dict(), result)
|
||||
|
||||
def test_api_get_components(self):
|
||||
"""Test the return of the components."""
|
||||
req = requests.get(_url(const.URL_API_COMPONENTS),
|
||||
headers=HA_HEADERS)
|
||||
self.assertEqual(hass.config.components, req.json())
|
||||
self.assertEqual(hass.config.components, set(req.json()))
|
||||
|
||||
def test_api_get_error_log(self):
|
||||
"""Test the return of the error log."""
|
||||
|
||||
Reference in new issue
Block a user