def CreateCallback(self): """Called when the entity is first saved.""" if len(self.key.id().split('/')) > 3: # Since this is not a test suite, the menu cache for the suite must # be updated. layered_cache.Delete(LIST_TESTS_SUBTEST_CACHE_KEY % self._GetMasterBotSuite(self.key))
def testDelete(self): self.SetCurrentUser('*****@*****.**') layered_cache.Set('hello', 'secret') self.SetCurrentUser('*****@*****.**') layered_cache.Set('hello', 'not secret') layered_cache.Delete('hello') self.SetCurrentUser('*****@*****.**') self.assertIsNone(layered_cache.Get('hello')) self.SetCurrentUser('*****@*****.**') self.assertIsNone(layered_cache.Get('hello'))
def _pre_delete_hook(cls, key): if len(key.id().split('/')) > 3: # Since this is not a test suite, the menu cache for the suite must # be updated. layered_cache.Delete(LIST_TESTS_SUBTEST_CACHE_KEY % TestMetadata._GetMasterBotSuite(key))