Merge "Correct test_get_v3_catalog test for result ordering"

This commit is contained in:
Jenkins 2015-02-10 06:02:39 +00:00 committed by Gerrit Code Review
commit 9e33c92a33
1 changed files with 8 additions and 1 deletions

View File

@ -80,6 +80,13 @@ class TestTemplatedCatalog(tests.TestCase, test_backend.CatalogTests):
def test_get_v3_catalog_endpoint_disabled(self):
self.skipTest("Templated backend doesn't have disabled endpoints")
def assert_catalogs_equal(self, expected, observed):
for e, o in zip(sorted(expected), sorted(observed)):
expected_endpoints = e.pop('endpoints')
observed_endpoints = o.pop('endpoints')
self.assertDictEqual(e, o)
self.assertItemsEqual(expected_endpoints, observed_endpoints)
def test_get_v3_catalog(self):
user_id = uuid.uuid4().hex
project_id = uuid.uuid4().hex
@ -111,7 +118,7 @@ class TestTemplatedCatalog(tests.TestCase, test_backend.CatalogTests):
'type': 'identity',
'name': "'Identity Service'",
'id': '1'}]
self.assertEqual(exp_catalog, catalog_ref)
self.assert_catalogs_equal(exp_catalog, catalog_ref)
def test_list_regions_filtered_by_parent_region_id(self):
self.skipTest('Templated backend does not support hints')