Run asyncio event loop in debug mode during tests (#13058)
* Run asyncio event loop in debug mode during tests * Remove debug mode again
This commit is contained in:
1 parent
26960283a0
commit
d0f089975d
4 files changed
+7
-8
No files matched your search
@@ -135,7 +135,7 @@ class TestTemplateCover(unittest.TestCase):
|
||||
entity = self.hass.states.get('cover.test')
|
||||
attrs = dict()
|
||||
attrs['position'] = 42
|
||||
self.hass.states.async_set(
|
||||
self.hass.states.set(
|
||||
entity.entity_id, entity.state,
|
||||
attributes=attrs)
|
||||
self.hass.block_till_done()
|
||||
@@ -148,7 +148,7 @@ class TestTemplateCover(unittest.TestCase):
|
||||
self.hass.block_till_done()
|
||||
entity = self.hass.states.get('cover.test')
|
||||
attrs['position'] = 0.0
|
||||
self.hass.states.async_set(
|
||||
self.hass.states.set(
|
||||
entity.entity_id, entity.state,
|
||||
attributes=attrs)
|
||||
self.hass.block_till_done()
|
||||
|
||||
@@ -302,7 +302,7 @@ def test_value_discovery_existing_entity(hass, mock_openzwave):
|
||||
'current_temperature'] is None
|
||||
|
||||
def mock_update(self):
|
||||
self.hass.async_add_job(self.async_update_ha_state)
|
||||
self.hass.add_job(self.async_update_ha_state)
|
||||
|
||||
with patch.object(zwave.node_entity.ZWaveBaseEntity,
|
||||
'maybe_schedule_update', new=mock_update):
|
||||
@@ -347,7 +347,7 @@ def test_power_schemes(hass, mock_openzwave):
|
||||
'switch.mock_node_mock_value').attributes
|
||||
|
||||
def mock_update(self):
|
||||
self.hass.async_add_job(self.async_update_ha_state)
|
||||
self.hass.add_job(self.async_update_ha_state)
|
||||
|
||||
with patch.object(zwave.node_entity.ZWaveBaseEntity,
|
||||
'maybe_schedule_update', new=mock_update):
|
||||
|
||||
Reference in new issue
Block a user