def test_requires_update(self): pooltype_cache = PoolTypeCache() pooltype_cache.ent_dir = self.ent_dir # Doesn't have data for pool with id 'someid' self.assertTrue(pooltype_cache.requires_update()) pooltype_cache.pooltype_map['someid'] = 'some type' # After adding data for that entitlements pool, it shouldn't need an update self.assertFalse(pooltype_cache.requires_update())
def test_requires_update_ents_with_no_pool(self): pooltype_cache = PoolTypeCache() pooltype_cache.ent_dir = self.ent_dir for ent in self.ent_dir.certs: ent.pool = None # No ents have pools so there is nothing we can update self.assertFalse(pooltype_cache.requires_update())