Do async_setup_platform in background (#36244)

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Paulus SchoutsenandJ. Nick Koston authored and GitHub committed 2020-05-31 22:18:30 -07:00
1 parent d488c779fc
commit 276f3afb00
161 files changed
+1184 -305

No files matched your search

+2
View File
@@ -70,6 +70,7 @@ class TestBOMWeatherSensor(unittest.TestCase):
"""Test the setup with custom settings."""
with assert_setup_component(1, sensor.DOMAIN):
assert setup_component(self.hass, sensor.DOMAIN, {"sensor": VALID_CONFIG})
self.hass.block_till_done()
fake_entities = [
"bom_fake_feels_like_c",
@@ -85,6 +86,7 @@ class TestBOMWeatherSensor(unittest.TestCase):
def test_sensor_values(self, mock_get):
"""Test retrieval of sensor values."""
assert setup_component(self.hass, sensor.DOMAIN, {"sensor": VALID_CONFIG})
self.hass.block_till_done()
weather = self.hass.states.get("sensor.bom_fake_weather").state
assert "Fine" == weather