Merge "Fix OS::Zaqar::MistralSubscription with mistralclient 3.0" into stable/ocata

This commit is contained in:
Jenkins 2017-08-17 15:50:21 +00:00 committed by Gerrit Code Review
commit d8c77f7ea8
2 changed files with 7 additions and 3 deletions

View File

@ -193,7 +193,9 @@ class MistralTrigger(ZaqarSubscription):
def _subscriber_url(self):
mistral_client = self.client('mistral')
return 'trust+%s/executions' % mistral_client.http_client.base_url
manager = getattr(mistral_client.executions, 'client',
mistral_client.executions)
return 'trust+%s/executions' % manager.http_client.base_url
def _subscription_options(self):
params = dict(self.properties[self.PARAMS])

View File

@ -348,8 +348,10 @@ class ZaqarMistralTriggerTest(common.HeatTestCase):
def client(name='zaqar'):
if name == 'mistral':
client = mock.Mock()
client.http_client = mock.Mock()
client.http_client.base_url = 'http://mistral.example.net:8989'
http_client = mock.Mock()
client.executions = mock.Mock(spec=['http_client'])
client.executions.http_client = http_client
http_client.base_url = 'http://mistral.example.net:8989'
return client
elif name == 'zaqar':
return self.fc