def prepareCachingTransaction(): if cached_list.isCachedListExists(data_id): if cached_list.isProcessing(data_id): return False else: cached_list.setProcessing(data_id) return True else: cached_list.createEmptyProcessingList(data_id) return True
def testSetProcessing(self): """Tests setProcessing function.""" cached_list_logic.setProcessing(self.not_processing_list_id) updated_list = cached_list_model.CachedList.get_by_id( self.not_processing_list_id) self.assertTrue(updated_list.is_processing)