def METHOD_NAME(app):
    password = "TestPassword1"
    params = {"password1": password, "password2": password}
    user = CreateTestData.create_user(
        name="pending_user", email="user@email.com"
    )
    user.set_pending()
    create_reset_key(user)
    assert user.is_pending(), user.state
    offset = url_for(
        controller="user",
        action="perform_reset",
        id=user.id,
        key=user.reset_key,
    )
    res = app.post(offset, params=params)
    user = model.User.get(user.id)
    assert user.is_active(), user