def test_find_endpoint_by_url(self): url = keystone.list_endpoints()[-1].url endpoint = keystone.find_endpoint(url=url) self.assertEqual(url, endpoint.url)
def test_find_endpoint_with_default(self): service = keystone.find_endpoint(service='never-never-land', default=None) self.assertIsNone(service)
def test_find_endpoint_by_service_id(self): service = keystone.find_service(name='keystone') endpoint = keystone.find_endpoint(service_id=service.id) self.assertEqual(endpoint.service_id, service.id)
def test_find_endpoint(self): endpoint = keystone.find_endpoint() self.assertTrue(endpoint.id)