summaryrefslogtreecommitdiff
path: root/tests/unit/cache/test_cache.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/cache/test_cache.py')
-rw-r--r--tests/unit/cache/test_cache.py38
1 files changed, 0 insertions, 38 deletions
diff --git a/tests/unit/cache/test_cache.py b/tests/unit/cache/test_cache.py
deleted file mode 100644
index c962c6bb..00000000
--- a/tests/unit/cache/test_cache.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 2013 Red Hat, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-from oslo_config import cfg
-from oslotest import base
-
-from openstack.common.cache._backends import memory
-from openstack.common.cache import cache
-
-
-class TestCacheModule(base.BaseTestCase):
-
- 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)
-
- 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)