def testCreateEmptyProcessingList(self): """Tests createEmptyProcessingList""" cached_list_logic.createEmptyProcessingList('empty_processing_list') test_list = cached_list_model.CachedList.get_by_id( 'empty_processing_list') self.assertListEqual([], test_list.list_data) self.assertTrue(test_list.is_processing)
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 testCreateEmptyProcessingList(self): """Tests createEmptyProcessingList""" cached_list_logic.createEmptyProcessingList('empty_processing_list') test_list = cached_list_model.CachedList.get_by_id('empty_processing_list') self.assertListEqual([], test_list.list_data) self.assertTrue(test_list.is_processing)