diff options
author | Jonathan Huot <jonathan.huot@thomsonreuters.com> | 2018-11-30 15:36:57 +0100 |
---|---|---|
committer | Jonathan Huot <jonathan.huot@thomsonreuters.com> | 2018-11-30 15:36:57 +0100 |
commit | d7891e70a7593bc428510f66d8c1e60ff3731c30 (patch) | |
tree | 7fa2c50690d317ddb1fa5e87a787076335b8dd1d | |
parent | 6bd865b36dc64caaa8aab9788742c9d54ce81c4d (diff) | |
download | oauthlib-preconf-server-metadata.tar.gz |
Sort dict and list in dict values for py27/36 compatpreconf-server-metadata
-rw-r--r-- | tests/oauth2/rfc6749/endpoints/test_metadata.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/oauth2/rfc6749/endpoints/test_metadata.py b/tests/oauth2/rfc6749/endpoints/test_metadata.py index 5174b2d..875316a 100644 --- a/tests/oauth2/rfc6749/endpoints/test_metadata.py +++ b/tests/oauth2/rfc6749/endpoints/test_metadata.py @@ -49,7 +49,7 @@ class MetadataEndpointTest(TestCase): "jwks_uri": "https://foo.bar/certs", "scopes_supported": ["email", "profile"] }) - self.assertEqual(metadata.claims, { + expected_claims = { "issuer": "https://foo.bar", "authorization_endpoint": "https://foo.bar/authorize", "introspection_endpoint": "https://foo.bar/introspect", @@ -88,4 +88,12 @@ class MetadataEndpointTest(TestCase): "client_secret_post", "client_secret_basic" ] - }) + } + + def sort_list(claims): + for k in claims.keys(): + claims[k] = sorted(claims[k]) + + sort_list(metadata.claims) + sort_list(expected_claims) + self.assertEqual(sorted(metadata.claims.items()), sorted(expected_claims.items())) |