Fix unit tests for PR #41509

This commit is contained in:
Sean Jenkins 2017-05-31 17:21:26 -06:00
parent eb7ef3c856
commit 095e5949a3
2 changed files with 3 additions and 3 deletions

View File

@ -791,7 +791,7 @@ def endpoint_absent(name, region=None, profile=None, interface=None, **connectio
profile=profile,
interface=interface,
**connection_args)
if not endpoint or 'Error' in endpoint:
if not endpoint:
return ret
else:
if __opts__.get('test'):

View File

@ -317,7 +317,7 @@ class KeystoneTestCase(TestCase):
'keystone.endpoint_create': mock}):
comt = ('Endpoint for service "{0}" already exists'.format(name))
ret.update({'comment': comt, 'result': None, 'changes': {}})
ret.update({'comment': comt, 'result': True, 'changes': {}})
self.assertDictEqual(keystone.endpoint_present(name), ret)
with patch.dict(keystone.__opts__, {'test': True}):
@ -326,7 +326,7 @@ class KeystoneTestCase(TestCase):
self.assertDictEqual(keystone.endpoint_present(name), ret)
comt = ('Endpoint for service "{0}" already exists'.format(name))
ret.update({'comment': comt, 'result': None, 'changes': {}})
ret.update({'comment': comt, 'result': True, 'changes': {}})
self.assertDictEqual(keystone.endpoint_present(name), ret)
with patch.dict(keystone.__opts__, {'test': False}):