diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-11-30 17:59:44 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-11-30 17:59:44 +0000 |
commit | c870213685e6c6079255128ed5e3c12e77bbf9c2 (patch) | |
tree | 4cf2b5377d888125755ac9de1dea173b4b213056 /tests/unit/cache/test_cache.py | |
parent | 87e0f0d35fd41666a7e94f8f802c08650cdaf902 (diff) | |
parent | 90ae25e38915cc502d9e9c52d59e8fb668a72ae1 (diff) | |
download | oslo-incubator-c870213685e6c6079255128ed5e3c12e77bbf9c2.tar.gz |
Merge "Cleaning up code in oslo-incubator"
Diffstat (limited to 'tests/unit/cache/test_cache.py')
-rw-r--r-- | tests/unit/cache/test_cache.py | 38 |
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) |