Пример #1
0
 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))
Пример #2
0
 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'))
Пример #3
0
 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))