def testUpdateLoginInfoSingletonWorks(self): "Verify that up2dateAuth.updateLoginInfo returns the proper auth info every time" ret1 = up2dateAuth.updateLoginInfo() import repoDirector rd = repoDirector.initRepoDirector() ret2 = up2dateAuth.updateLoginInfo() self.__verifyTokens(rd)
def testUp2dateLoginInfoWorks(self): "Verify that up2dateAuth.updateLoginInfo retuns a working authToken" import repoDirector rd = repoDirector.initRepoDirector() ret2 = up2dateAuth.updateLoginInfo() self.__verifyTokens(rd)
log.log_me(msg) raise up2dateErrors.CommunicationError(msg) except rpclib.ProtocolError, e: log.log_me("A protocol error occurred: %s , attempt #%s," % ( e.errmsg, attempt_count)) (errCode, errMsg) = rpclib.reportError(e.headers) reset = 0 if abs(errCode) == 34: log.log_me("Auth token timeout occurred\n errmsg: %s" % errMsg) # this calls login, which in tern calls doCall (ie, # this function) but login should never get a 34, so # should be safe from recursion rd = repoDirector.initRepoDirector() rd.updateAuthInfo() reset = 1 # the servers are being throttle to pay users only, catch the # exceptions and display a nice error message if abs(errCode) == 51: log.log_me("Server has refused connection due to high load") raise up2dateErrors.CommunicationError(e.errmsg) # if we get a 404 from our server, thats pretty # fatal... no point in retrying over and over. Note that # errCode == 17 is specific to our servers, if the # serverURL is just pointing somewhere random they will # get a 0 for errcode and will raise a CommunicationError if abs(errCode) == 17: #in this case, the args are the package string, so lets try to
log.log_me(msg) raise up2dateErrors.CommunicationError(msg) except rpclib.ProtocolError, e: log.log_me("A protocol error occurred: %s , attempt #%s," % (e.errmsg, attempt_count)) (errCode, errMsg) = rpclib.reportError(e.headers) reset = 0 if abs(errCode) == 34: log.log_me("Auth token timeout occurred\n errmsg: %s" % errMsg) # this calls login, which in tern calls doCall (ie, # this function) but login should never get a 34, so # should be safe from recursion rd = repoDirector.initRepoDirector() rd.updateAuthInfo() reset = 1 # the servers are being throttle to pay users only, catch the # exceptions and display a nice error message if abs(errCode) == 51: log.log_me("Server has refused connection due to high load") raise up2dateErrors.CommunicationError(e.errmsg) # if we get a 404 from our server, thats pretty # fatal... no point in retrying over and over. Note that # errCode == 17 is specific to our servers, if the # serverURL is just pointing somewhere random they will # get a 0 for errcode and will raise a CommunicationError if abs(errCode) == 17: #in this case, the args are the package string, so lets try to