Do async_setup_platform in background (#36244)

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

View File

@@ -48,6 +48,7 @@ class TestFolderSensor(unittest.TestCase):
create_file(TEST_FILE)
config = {"sensor": {"platform": "folder", CONF_FOLDER_PATHS: TEST_DIR}}
assert setup_component(self.hass, "sensor", config)
self.hass.block_till_done()
assert len(self.hass.states.entity_ids()) == 1
state = self.hass.states.get("sensor.test_folder")
assert state.state == "0.0"