def METHOD_NAME(
    app, db_context, user, oldpw, newpw, exception, message
):
    SetPasswordHandler.create_table(db_context)
    pw_handler = SetPasswordHandler(db_context)
    admin_user = "admin"
    admin_pw = utils.crypt_password("old_password")
    SetPasswordHandler.create_admin_user(
        db_context, username=admin_user, crypted_password=admin_pw
    )
    check_for_exception(pw_handler, user, oldpw, newpw, exception, message)
    # make sure that the password did not change in between and the
    # password could be set correctly
    pw_handler.set_password("admin", "old_password", "admin_password")