Merge "Fix key word argument interface_type -> interface"

This commit is contained in:
Jenkins 2016-08-19 04:31:21 +00:00 committed by Gerrit Code Review
commit afd4f6dd61
2 changed files with 4 additions and 1 deletions

View File

@ -121,7 +121,7 @@ def get_service_url(session, service_type='baremetal',
:returns: an http/https url for the desired endpoint. :returns: an http/https url for the desired endpoint.
""" """
return session.get_endpoint(service_type=service_type, return session.get_endpoint(service_type=service_type,
interface_type=endpoint_type, interface=endpoint_type,
region=CONF.keystone.region_name) region=CONF.keystone.region_name)

View File

@ -56,6 +56,9 @@ class KeystoneTestCase(base.TestCase):
mock_sess = mock.Mock() mock_sess = mock.Mock()
mock_sess.get_endpoint.return_value = fake_url mock_sess.get_endpoint.return_value = fake_url
res = keystone.get_service_url(mock_sess) res = keystone.get_service_url(mock_sess)
mock_sess.get_endpoint.assert_called_with(
interface='internal', region='fake_region',
service_type='baremetal')
self.assertEqual(fake_url, res) self.assertEqual(fake_url, res)
def test_get_url_failure(self): def test_get_url_failure(self):