예제 #1
0
 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
예제 #2
0
 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
예제 #3
0
 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)
예제 #4
0
 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)