Пример #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)])
Пример #2
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')])
Пример #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')]
     )
Пример #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()
Пример #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()