Ensure test async_create_task eager start behavior matches production (#115517)

This commit is contained in:
J. Nick Koston 2024-04-13 10:58:52 -10:00 committed by GitHub
parent d9617a8e3a
commit ee535ee611
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 125 additions and 82 deletions

View file

@ -148,7 +148,9 @@ class GitHubConfigFlow(ConfigFlow, domain=DOMAIN):
return self.async_abort(reason="could_not_register")
if self.login_task is None:
self.login_task = self.hass.async_create_task(_wait_for_login())
self.login_task = self.hass.async_create_task(
_wait_for_login(), eager_start=False
)
if self.login_task.done():
if self.login_task.exception():