def test_expired_reset_password_link():
    """Test that expired reset password links are reported to the user"""
    app = create_ctfd()
    with app.app_context():
        set_config("mail_server", "localhost")
        set_config("mail_port", 25)
        set_config("mail_useauth", True)
        set_config("mail_username", "username")
        set_config("mail_password", "password")

        register_user(app, name="user1", email="user@user.com")

        with app.test_client() as client:
            forgot_link = "http://localhost/reset_password/bb8a8526146e50778b211ae63074595880edbc0b"
            r = client.get(forgot_link)

            assert (
                "Your reset link is invalid, please generate a new one"
                in r.get_data(as_text=True)
            )
    destroy_ctfd(app)
Test that expired reset password links are reported to the user
tests/users/test_auth.py