示例#1
0
 def setUp(self):
     super(CacheBaseTest, self).setUp()
     self.client = cache.get_cache(self.cache_url)
 def test_get_cache(self):
     driver = cache.get_cache()
     self.assertIsInstance(driver, memory.MemoryBackend)
 def test_get_cache_options(self):
     driver = cache.get_cache('memory://?default_ttl=4')
     self.assertIsInstance(driver, memory.MemoryBackend)
     self.assertEqual(driver._options, {'default_ttl': '4'})
     self.assertEqual(driver._default_ttl, 4)
 def test_oslo_config(self):
     conf = cfg.ConfigOpts()
     cache.register_oslo_configs(conf)
     driver = cache.get_cache(conf.cache_url)
     self.assertIsInstance(driver, memory.MemoryBackend)
示例#5
0
 def setUp(self):
     super(CacheBaseTest, self).setUp()
     self.client = cache.get_cache(self.cache_url)
示例#6
0
 def test_get_cache_options(self):
     driver = cache.get_cache('memory://?default_ttl=4')
     self.assertIsInstance(driver, memory.MemoryBackend)
     self.assertEqual(driver._options, {'default_ttl': '4'})
     self.assertEqual(driver._default_ttl, 4)
示例#7
0
 def test_get_cache(self):
     driver = cache.get_cache()
     self.assertIsInstance(driver, memory.MemoryBackend)
示例#8
0
 def test_oslo_config(self):
     conf = cfg.ConfigOpts()
     cache.register_oslo_configs(conf)
     driver = cache.get_cache(conf.cache_url)
     self.assertIsInstance(driver, memory.MemoryBackend)