def loadExpectation(self, requestDict, group, APIShortName): ''' Currently, these expectation were save into file. In the future, we will move them into Redis or memcache ''' workingPath=self.getWorkingPath(group, APIShortName) expectationFile=self.getExpectationPath(workingPath) fileHandler=FileWrapper(expectationFile) if not fileHandler.isExist() or fileHandler.expired(5000): print 'Expectation file is not found or have been expired' return {} print 'Expectation file is avaliable' return fileHandler.loadDictFromJsonFile()