Use setup_component in tests v1 (#3507)

* update unittests like #3414

* setup_component - splunk

* setup_component - statsd

* fix statsd & splunk unittest config values

* component_setup - device_sun_light_trigger

* setup_component - introduction

* component_setup - persistent_notification

* setup_component - logentries, mqtt eventstream

* fix unittest logentries
This commit is contained in:
Pascal Vizeli authored and GitHub committed 2016-09-25 23:15:21 +02:00
1 parent 0c0feda834
commit bbfd86dec3
16 files changed
+62 -46

No files matched your search

+3 -1
View File
@@ -3,6 +3,7 @@ import json
import unittest
from unittest.mock import ANY, patch
from homeassistant.bootstrap import setup_component
import homeassistant.components.mqtt_eventstream as eventstream
from homeassistant.const import EVENT_STATE_CHANGED
from homeassistant.core import State
@@ -38,7 +39,8 @@ class TestMqttEventStream(unittest.TestCase):
config['subscribe_topic'] = sub_topic
if pub_topic:
config['publish_topic'] = pub_topic
return eventstream.setup(self.hass, {eventstream.DOMAIN: config})
return setup_component(self.hass, eventstream.DOMAIN, {
eventstream.DOMAIN: config})
def test_setup_succeeds(self):
""""Test the success of the setup."""