fixed oauth2test runtimewarning and other errors