Merge "[osclients] Fix zaqar client"

This commit is contained in:
Jenkins 2016-09-06 12:51:50 +00:00 committed by Gerrit Code Review
commit b6bedc5b78
2 changed files with 2 additions and 2 deletions

View File

@ -531,7 +531,7 @@ class Zaqar(OSClient):
def create_client(self, version=None, service_type=None):
"""Return Zaqar client."""
from zaqarclient.queues import client as zaqar
tenant_id = self.keystone.auth_ref.get("token").get("tenant").get("id")
tenant_id = self.keystone.auth_ref.project_id
conf = {"auth_opts": {"backend": "keystone", "options": {
"os_username": self.credential.username,
"os_password": self.credential.password,

View File

@ -574,7 +574,7 @@ class OSClientsTestCase(test.TestCase):
mock_zaqar = mock.MagicMock()
mock_zaqar.client.Client = mock.MagicMock(return_value=fake_zaqar)
self.assertNotIn("zaqar", self.clients.cache)
p_id = self.auth_ref.get("token").get("tenant").get("id")
p_id = self.auth_ref.project_id
with mock.patch.dict("sys.modules", {"zaqarclient.queues":
mock_zaqar}):
client = self.clients.zaqar()