From 3e3ee9184a861f02a3ce900352dd31ae295a3647 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 31 Aug 2015 00:54:00 -0700 Subject: [PATCH] Fix broken conversation test --- tests/components/test_conversation.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/components/test_conversation.py b/tests/components/test_conversation.py index c03cb3c5ffe..40bcabff705 100644 --- a/tests/components/test_conversation.py +++ b/tests/components/test_conversation.py @@ -7,7 +7,6 @@ Tests Conversation component. # pylint: disable=too-many-public-methods,protected-access import unittest -import homeassistant.core as ha import homeassistant.components as core_components import homeassistant.components.conversation as conversation import homeassistant.components.demo as demo @@ -34,35 +33,36 @@ class TestConversation(unittest.TestCase): self.assertTrue( conversation.setup(self.hass, {conversation.DOMAIN: {}})) - light.turn_off(self.hass, '{}.kitchen'.format(light.DOMAIN)) + light.turn_off(self.hass, 'light.kitchen_lights') - event_data = {conversation.ATTR_TEXT: 'turn kitchen on'} + event_data = {conversation.ATTR_TEXT: 'turn kitchen lights on'} self.hass.services.call( conversation.DOMAIN, 'process', event_data, True) self.assertTrue( - light.is_on(self.hass, '{}.kitchen'.format(light.DOMAIN))) + light.is_on(self.hass, 'light.kitchen_lights')) def test_setup_and_turn_off(self): """ Setup and perform good turn off requests """ self.assertTrue( conversation.setup(self.hass, {conversation.DOMAIN: {}})) - light.turn_on(self.hass, '{}.kitchen'.format(light.DOMAIN)) + light.turn_on(self.hass, 'light.kitchen_lights') - event_data = {conversation.ATTR_TEXT: 'turn kitchen off'} + event_data = {conversation.ATTR_TEXT: 'turn kitchen lights off'} self.hass.services.call( conversation.DOMAIN, 'process', event_data, True) self.assertFalse( - light.is_on(self.hass, '{}.kitchen'.format(light.DOMAIN))) + light.is_on(self.hass, 'light.kitchen_lights')) def test_setup_and_bad_request_format(self): """ Setup and perform a badly formatted request """ self.assertTrue( conversation.setup(self.hass, {conversation.DOMAIN: {}})) - event_data = {conversation.ATTR_TEXT: + event_data = { + conversation.ATTR_TEXT: 'what is the answer to the ultimate question of life, ' + 'the universe and everything'} self.assertTrue(self.hass.services.call(