def testTrigger_precache_with_unconfigured_region(self):
     # Clears all cache regions
     cache_regions.clear()
     results = prepare_pre_cache(self.tenant, 'NC', '820568d0-ddaa-11e2-a63d-68a86d3c2f82')
     triggered = trigger_precache(self.tenant, 'NC', results, {})
     self.assertFalse(triggered)
 def testTrigger_precache_with_empty_results(self):
     results = prepare_pre_cache(self.tenant, 'DU', '820568d0-ddaa-11e2-a63d-68a86d3c2f82')
     triggered = trigger_precache(self.tenant, 'DU', results, {})
     self.assertFalse(triggered)
 def testPrepare_pre_cache_nodata(self):
     results = prepare_pre_cache(self.tenant, 'NC', '2cf08036-ddb0-11e2-a15e-68a86d3c2f82')
     self.assertEqual(0, len(results))
 def testTrigger_precache(self):
     results = prepare_pre_cache(self.tenant, 'NC', '820568d0-ddaa-11e2-a63d-68a86d3c2f82')
     triggered = trigger_precache(self.tenant, 'NC', results, {})
     self.assertTrue(triggered)
 def testPrepare_pre_cache(self):
     results = prepare_pre_cache(self.tenant, 'NC', '820568d0-ddaa-11e2-a63d-68a86d3c2f82')
     self.assertEqual(5, len(results))