1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

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
2016-09-25 23:15:21 +02:00
committed by GitHub
parent 0c0feda834
commit bbfd86dec3
16 changed files with 62 additions and 46 deletions

View File

@@ -104,7 +104,7 @@ class TestMfiSensorSetup(unittest.TestCase):
print(ports['bad'].model)
mock_client.return_value.get_devices.return_value = \
[mock.MagicMock(ports=ports)]
assert sensor.setup(self.hass, self.GOOD_CONFIG)
assert setup_component(self.hass, sensor.DOMAIN, self.GOOD_CONFIG)
for ident, port in ports.items():
if ident != 'bad':
mock_sensor.assert_any_call(port, self.hass)