From 720e5876a7e537a79ffb3aa6702248509bc8c2b2 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sat, 19 Sep 2015 21:02:28 -0700 Subject: [PATCH] Fix broken automation test --- tests/components/automation/test_init.py | 43 ++++++++++-------------- 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/tests/components/automation/test_init.py b/tests/components/automation/test_init.py index 272a9cb00f5..3f6b0dab6f1 100644 --- a/tests/components/automation/test_init.py +++ b/tests/components/automation/test_init.py @@ -343,33 +343,26 @@ class TestAutomation(unittest.TestCase): def test_automation_list_setting(self): """ Event is not a valid condition. Will it still work? """ - automation.setup(self.hass, { - automation.DOMAIN: [ - { - 'trigger': [ - { - 'platform': 'event', - 'event_type': 'test_event', - }, - - ], - 'action': { - 'execute_service': 'test.automation', - } + self.assertTrue(automation.setup(self.hass, { + automation.DOMAIN: [{ + 'trigger': { + 'platform': 'event', + 'event_type': 'test_event', }, - { - 'trigger': [ - { - 'platform': 'event', - 'event_type': 'test_event_2', - }, - ], - 'action': { - 'execute_service': 'test.automation', - } + + 'action': { + 'service': 'test.automation', } - ] - }) + }, { + 'trigger': { + 'platform': 'event', + 'event_type': 'test_event_2', + }, + 'action': { + 'service': 'test.automation', + } + }] + })) self.hass.bus.fire('test_event') self.hass.pool.block_till_done()