Ensure config entry oauth2 tests add config entry before updating it (#110421)

This commit is contained in:
J. Nick Koston 2024-02-12 15:59:17 -06:00 committed by GitHub
parent d9c581e2c8
commit e605b96d84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -709,6 +709,7 @@ async def test_oauth_session(
}, },
}, },
) )
config_entry.add_to_hass(hass)
now = time.time() now = time.time()
session = config_entry_oauth2_flow.OAuth2Session(hass, config_entry, local_impl) session = config_entry_oauth2_flow.OAuth2Session(hass, config_entry, local_impl)
@ -755,6 +756,7 @@ async def test_oauth_session_with_clock_slightly_out_of_sync(
}, },
}, },
) )
config_entry.add_to_hass(hass)
now = time.time() now = time.time()
session = config_entry_oauth2_flow.OAuth2Session(hass, config_entry, local_impl) session = config_entry_oauth2_flow.OAuth2Session(hass, config_entry, local_impl)