Ejemplo n.º 1
0
 def test_all_organization_names_recache(self):
     """After writing an org, the cache should clear."""
     name_key = Organization.all_of_property_key('name')
     self.test_all_organization_names_caches()
     Organization.create().put()
     self.assertIsNone(memcache.get(name_key))
Ejemplo n.º 2
0
 def test_all_organization_names_caches(self):
     """After the first query, all names should be cached."""
     name_key = Organization.all_of_property_key('name')
     self.assertIsNone(memcache.get(name_key))
     orgNames = Organization.get_all_of_property('name')
     self.assertEqual(orgNames, memcache.get(name_key))