Beispiel #1
0
 def test_get_cache(self, mock_get_cache_region):
     self.assertIsNotNone(cache.get_cache(self.memory_conf))
     self.assertIsNotNone(cache.get_cache(self.dict_conf))
     self.assertIsNotNone(cache.get_cache(self.null_cache_conf))
     mock_get_cache_region.assert_has_calls(
         [mock.call(self.dict_conf),
          mock.call(self.null_cache_conf)])
 def test_get_cache(self, mock_get_cache_region,
                    mock_get_cache_region_for_legacy):
     self.assertIsNotNone(cache.get_cache(self.memory_conf))
     self.assertIsNotNone(cache.get_cache(self.dict_conf))
     self.assertIsNotNone(cache.get_cache(self.null_cache_conf))
     mock_get_cache_region.assert_has_calls(
         [mock.call(self.dict_conf),
          mock.call(self.null_cache_conf)])
     mock_get_cache_region_for_legacy.assert_has_calls(
         [mock.call('memory://?default_ttl=5')])
Beispiel #3
0
 def test_get_cache(self, mock_get_cache_region,
                    mock_get_cache_region_for_legacy):
     self.assertIsNotNone(cache.get_cache(self.memory_conf))
     self.assertIsNotNone(cache.get_cache(self.dict_conf))
     self.assertIsNotNone(cache.get_cache(self.null_cache_conf))
     mock_get_cache_region.assert_has_calls(
         [mock.call(self.dict_conf),
          mock.call(self.null_cache_conf)]
     )
     mock_get_cache_region_for_legacy.assert_has_calls(
         [mock.call('memory://?default_ttl=5')]
     )
Beispiel #4
0
    def __init__(self, conf):
        self.conf = conf
        self._cache = cache.get_cache(self.conf)

        self.plugin_rpc = MetadataPluginAPI(topics.PLUGIN)
        self.context = context.get_admin_context_without_session()
Beispiel #5
0
    def __init__(self, conf):
        self.conf = conf
        self._cache = cache.get_cache(self.conf)

        self.plugin_rpc = MetadataPluginAPI(topics.PLUGIN)
        self.context = context.get_admin_context_without_session()