Fix Ceph object store tests on Python 3
* Fix keystoneclient mock on Python 3: service_catalog.url_for() must return a string because urllib.parse.urljoin() is now more strict on Python 3 * tox -e py34: add objectstore.test_rgw Change-Id: I0a4a33a26b7984854c8561866a6f49e2b4d7ff6d
This commit is contained in:
parent
4a392ca17d
commit
f945f9b797
@ -51,6 +51,7 @@ class TestManager(manager.AgentManager):
|
||||
def __init__(self):
|
||||
super(TestManager, self).__init__()
|
||||
self.keystone = mock.MagicMock()
|
||||
self.keystone.service_catalog.url_for.return_value = '/endpoint'
|
||||
|
||||
|
||||
class TestRgwPollster(testscenarios.testcase.WithScenarios,
|
||||
@ -157,6 +158,7 @@ class TestRgwPollster(testscenarios.testcase.WithScenarios,
|
||||
|
||||
def test_get_endpoint_only_once(self):
|
||||
mock_url_for = mock.MagicMock()
|
||||
mock_url_for.return_value = '/endpoint'
|
||||
api_method = 'get_%s' % self.pollster.METHOD
|
||||
with mockpatch.PatchObject(rgw_client, api_method,
|
||||
new=mock.MagicMock()):
|
||||
|
1
tox.ini
1
tox.ini
@ -62,6 +62,7 @@ commands = python -m testtools.run \
|
||||
ceilometer.tests.network.services.test_vpnaas \
|
||||
ceilometer.tests.network.test_floatingip \
|
||||
ceilometer.tests.network.test_notifications \
|
||||
ceilometer.tests.objectstore.test_rgw \
|
||||
ceilometer.tests.orchestration.test_notifications \
|
||||
ceilometer.tests.profiler.test_notifications \
|
||||
ceilometer.tests.publisher.test_direct \
|
||||
|
Loading…
x
Reference in New Issue
Block a user