Migrate auth tests to use freezegun (#105243)
This commit is contained in:
parent
2daa94b600
commit
6666b796f2
2 changed files with 13 additions and 18 deletions
|
@ -894,10 +894,7 @@ async def test_auth_module_expired_session(mock_hass) -> None:
|
|||
assert step["type"] == data_entry_flow.FlowResultType.FORM
|
||||
assert step["step_id"] == "mfa"
|
||||
|
||||
with patch(
|
||||
"homeassistant.util.dt.utcnow",
|
||||
return_value=dt_util.utcnow() + MFA_SESSION_EXPIRATION,
|
||||
):
|
||||
with freeze_time(dt_util.utcnow() + MFA_SESSION_EXPIRATION):
|
||||
step = await manager.login_flow.async_configure(
|
||||
step["flow_id"], {"pin": "test-pin"}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue