Switch to python-keystoneclient 0.2.3.

Fixed the bug #1151665 by having python-keystoneclient dependency to
version >=0.2.3.

Also fixed the issue of setting the fake memory cache for keystone
middleware in unit test by using the correct configuration and request
environment.

Change-Id: Id3706bea6083c03adc46a8716c5cb8074339fc45
This commit is contained in:
Lianhao Lu 2013-03-19 14:11:56 +08:00
parent f2ba3effa8
commit cf1c2d6259
3 changed files with 18 additions and 6 deletions

View File

@ -133,7 +133,7 @@ class FunctionalTest(db_test_base.TestBase):
pecan.set_config({}, overwrite=True)
def get_json(self, path, expect_errors=False, headers=None,
q=[], **params):
extra_environ=None, q=[], **params):
full_path = self.PATH_PREFIX + path
query_params = {'q.field': [],
'q.value': [],
@ -150,6 +150,7 @@ class FunctionalTest(db_test_base.TestBase):
response = self.app.get(full_path,
params=all_params,
headers=headers,
extra_environ=extra_environ,
expect_errors=expect_errors)
if not expect_errors:
response = response.json

View File

@ -18,6 +18,10 @@
"""Test ACL."""
import datetime
from oslo.config import cfg
from ceilometer.api import acl
from ceilometer import policy
from .base import FunctionalTest
@ -54,9 +58,19 @@ class TestAPIACL(FunctionalTest):
def setUp(self):
super(TestAPIACL, self).setUp()
self.app.app._cache = FakeMemcache()
self.environ = {'fake.cache': FakeMemcache()}
def get_json(self, path, expect_errors=False, headers=None,
q=[], **params):
return super(TestAPIACL, self).get_json(path,
expect_errors=expect_errors,
headers=headers,
q=q,
extra_environ=self.environ,
**params)
def _make_app(self):
cfg.CONF.set_override("cache", "fake.cache", group=acl.OPT_GROUP_NAME)
return super(TestAPIACL, self)._make_app(enable_acl=True)
def test_non_authenticated(self):

View File

@ -14,10 +14,7 @@ pecan>=0.2.0
stevedore>=0.7
python-glanceclient
python-novaclient>=2.6.10
# FIXME(llu) Until the latest python-keystoneclient compatible with oslo.config
# is ready on Pypi, we use master for work-around. Bug #1151665.
# python-keystoneclient>=0.2,<0.3
http://tarballs.openstack.org/python-keystoneclient/python-keystoneclient-master.tar.gz#egg=python-keystoneclient
python-keystoneclient>=0.2.3
python-swiftclient
lxml
requests<1.0