Clean up some async stuff (#3915)
* Clean up some async stuff * Adjust comments * Pass hass instance to eventbus
This commit is contained in:
1 parent
daea93d9f9
commit
4c8d1d9d2f
7 files changed
+139
-111
No files matched your search
@@ -145,14 +145,14 @@ class TestAPI(unittest.TestCase):
|
||||
requests.post(_url(const.URL_API_STATES_ENTITY.format("test.test")),
|
||||
data=json.dumps({"state": "not_to_be_set"}),
|
||||
headers=HA_HEADERS)
|
||||
hass.bus._pool.block_till_done()
|
||||
hass.block_till_done()
|
||||
self.assertEqual(0, len(events))
|
||||
|
||||
requests.post(_url(const.URL_API_STATES_ENTITY.format("test.test")),
|
||||
data=json.dumps({"state": "not_to_be_set",
|
||||
"force_update": True}),
|
||||
headers=HA_HEADERS)
|
||||
hass.bus._pool.block_till_done()
|
||||
hass.block_till_done()
|
||||
self.assertEqual(1, len(events))
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
|
||||
Reference in new issue
Block a user