MCPcopy Index your code
hub / github.com/fastapi-users/fastapi-users / test_inactive_user

Method test_inactive_user

tests/test_manager.py:511–526  ·  view source on GitHub ↗
(
        self,
        inactive_user: UserModel,
        user_manager: UserManagerMock[UserModel],
        forgot_password_token,
    )

Source from the content-addressed store, hash-verified

509 assert user_manager.on_after_reset_password.called is False
510
511 async def test_inactive_user(
512 self,
513 inactive_user: UserModel,
514 user_manager: UserManagerMock[UserModel],
515 forgot_password_token,
516 ):
517 with pytest.raises(UserInactive):
518 await user_manager.reset_password(
519 forgot_password_token(
520 inactive_user.id,
521 current_password_hash=inactive_user.hashed_password,
522 ),
523 "guinevere",
524 )
525 assert user_manager._update.called is False
526 assert user_manager.on_after_reset_password.called is False
527
528 async def test_invalid_password(
529 self,

Callers

nothing calls this directly

Calls 2

forgot_password_tokenFunction · 0.85
reset_passwordMethod · 0.80

Tested by

no test coverage detected