Script: new attribute if can cancel

This commit is contained in:
Paulus Schoutsen 2015-11-14 15:36:27 -08:00
parent eabf9087f3
commit e2c530b85d
2 changed files with 11 additions and 1 deletions

View file

@ -88,6 +88,8 @@ class TestScript(unittest.TestCase):
self.assertEqual(1, len(calls))
self.assertEqual('world', calls[0].data.get('hello'))
self.assertEqual(
True, self.hass.states.get(ENTITY_ID).attributes.get('can_cancel'))
def test_calling_service_old(self):
calls = []
@ -172,6 +174,9 @@ class TestScript(unittest.TestCase):
self.hass.pool.block_till_done()
self.assertTrue(script.is_on(self.hass, ENTITY_ID))
self.assertEqual(
False,
self.hass.states.get(ENTITY_ID).attributes.get('can_cancel'))
self.assertEqual(
event,