def setUp(self): """Initialization""" #create our reader ggAccount = GReader.googleReader() #login to google ggAccount.authenticate() self.ggAccount = ggAccount
def testGoogleReaderLogin(self): """ Test that we can connect to our google reader account""" try: #create our reader ggAccount = GReader.googleReader() #login to google ggAccount.authenticate() except GReader.googleReaderError,e: self.fail()
logHandle = logging.FileHandler(logName) logFormat = logging.Formatter(messageFormat, dateFormat) logHandle.setFormatter(logFormat) log.addHandler(logHandle) return log if __name__=='__main__': #start our logging logger = initializeLogging(loggingLevel=logging.INFO) #record the start time startTime = datetime.datetime.now() #create our reader interface object ggAccount = GReader.googleReader() #login to google ggAccount.authenticate() ggAccount.listAndTagArticles() #record the end of the run endTIme = datetime.datetime.now() logger.info('Completed run in %d seconds' % (endTIme-startTime).seconds)