Convert config.components to a set (#5824)
This commit is contained in:
parent
f3b9fa2f41
commit
c54517de90
44 changed files with 118 additions and 104 deletions
|
@ -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."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue