Fixes the templated backend tests for Python3
Dictionaries are no longer sortable in Python3. To get around this we provide a customer key to sorted and just sort by the 'id' value. bp python3 Change-Id: Ie648b457fd92cde140d9fa2efb5127f0f26c243a
This commit is contained in:
parent
1ee14754ea
commit
72e8f55946
|
@ -88,7 +88,9 @@ class TestTemplatedCatalog(unit.TestCase, test_backend.CatalogTests):
|
|||
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)):
|
||||
sort_key = lambda d: d['id']
|
||||
for e, o in zip(sorted(expected, key=sort_key),
|
||||
sorted(observed, key=sort_key)):
|
||||
expected_endpoints = e.pop('endpoints')
|
||||
observed_endpoints = o.pop('endpoints')
|
||||
self.assertDictEqual(e, o)
|
||||
|
|
|
@ -3,7 +3,6 @@ keystone.tests.unit.common.test_notifications
|
|||
keystone.tests.unit.test_associate_project_endpoint_extension
|
||||
keystone.tests.unit.test_backend_ldap
|
||||
keystone.tests.unit.test_backend_ldap_pool
|
||||
keystone.tests.unit.test_backend_templated
|
||||
keystone.tests.unit.test_cert_setup
|
||||
keystone.tests.unit.test_contrib_simple_cert
|
||||
keystone.tests.unit.test_hacking_checks
|
||||
|
|
Loading…
Reference in New Issue