diff options
author | venkata edara <redara@redhat.com> | 2017-05-10 13:27:38 +0530 |
---|---|---|
committer | Prashanth Pai <ppai@redhat.com> | 2017-05-11 05:48:27 +0000 |
commit | 513988915aa1af13a989d062b021fe1562cbf18d (patch) | |
tree | 1c281911e3a9bfa97f8a7285f20691cb77c45c1d /test/unit/proxy/test_server.py | |
parent | e9c2c5eb55e1012ccce0ce51ac48bed0c0f1d4b7 (diff) |
Rebase to Swift 2.10.1 (newton)
Change-Id: I53a962c9a301089c8aed0b43c50f944c30225944
Signed-off-by: venkata edara <redara@redhat.com>
Reviewed-on: https://review.gluster.org/16653
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Tested-by: Prashanth Pai <ppai@redhat.com>
Diffstat (limited to 'test/unit/proxy/test_server.py')
-rw-r--r-- | test/unit/proxy/test_server.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/test/unit/proxy/test_server.py b/test/unit/proxy/test_server.py index bdce41f..64c5825 100644 --- a/test/unit/proxy/test_server.py +++ b/test/unit/proxy/test_server.py @@ -66,8 +66,7 @@ from swift.common.ring import RingData from swift.common.utils import mkdirs, normalize_timestamp, NullLogger from swift.common.wsgi import monkey_patch_mimetools, loadapp from swift.proxy.controllers import base as proxy_base -from swift.proxy.controllers.base import get_container_memcache_key, \ - get_account_memcache_key, cors_validation +from swift.proxy.controllers.base import get_cache_key,cors_validation import swift.proxy.controllers import swift.proxy.controllers.obj from swift.common.swob import Request, Response, HTTPUnauthorized, \ @@ -474,14 +473,14 @@ class TestController(unittest.TestCase): self.controller.account_info(self.account) self.assertEquals(count, 123) with save_globals(): - cache_key = get_account_memcache_key(self.account) + cache_key = get_cache_key(self.account) account_info = {'status': 200, 'container_count': 1234} self.memcache.set(cache_key, account_info) partition, nodes, count = \ self.controller.account_info(self.account) self.assertEquals(count, 1234) with save_globals(): - cache_key = get_account_memcache_key(self.account) + cache_key = get_cache_key(self.account) account_info = {'status': 200, 'container_count': '1234'} self.memcache.set(cache_key, account_info) partition, nodes, count = \ @@ -509,7 +508,7 @@ class TestController(unittest.TestCase): # Test the internal representation in memcache # 'container_count' changed from int to str - cache_key = get_account_memcache_key(self.account) + cache_key = get_cache_key(self.account) container_info = {'status': 200, 'container_count': '12345', 'total_object_count': None, @@ -536,7 +535,7 @@ class TestController(unittest.TestCase): # Test the internal representation in memcache # 'container_count' changed from 0 to None - cache_key = get_account_memcache_key(self.account) + cache_key = get_cache_key(self.account) account_info = {'status': 404, 'container_count': None, # internally keep None 'total_object_count': None, @@ -613,8 +612,7 @@ class TestController(unittest.TestCase): self.account, self.container, self.request) self.check_container_info_return(ret) - cache_key = get_container_memcache_key(self.account, - self.container) + cache_key = get_cache_key(self.account,self.container) cache_value = self.memcache.get(cache_key) self.assertTrue(isinstance(cache_value, dict)) self.assertEquals(200, cache_value.get('status')) @@ -636,8 +634,8 @@ class TestController(unittest.TestCase): self.account, self.container, self.request) self.check_container_info_return(ret, True) - cache_key = get_container_memcache_key(self.account, - self.container) + cache_key = get_cache_key(self.account, + self.container) cache_value = self.memcache.get(cache_key) self.assertTrue(isinstance(cache_value, dict)) self.assertEquals(404, cache_value.get('status')) @@ -652,7 +650,7 @@ class TestController(unittest.TestCase): self.account, self.container, self.request) self.check_container_info_return(ret, True) - cache_key = get_container_memcache_key(self.account, + cache_key = get_cache_key(self.account, self.container) cache_value = self.memcache.get(cache_key) self.assertTrue(isinstance(cache_value, dict)) |