Remove unused assertions from test_v3.py
These assertions are not used anywhere in keystone's tests. The assertion for service providers was added but never used: I62ec9619d8b187cda80100e383d40b158550b71f The token assertion was no longer used when we removed the v2.0 token API as noted in the commit message of: I4c3e35f3565b4b60ae4d00cc2490bd04aba1a800 Change-Id: If28273c88518df0ba6b75a98f13f123bee574fb5
This commit is contained in:
parent
ec338a3374
commit
b0cc66e2a8
@ -741,31 +741,6 @@ class RestfulTestCase(unit.SQLDriverOverrides, rest.RestfulTestCase,
|
|||||||
|
|
||||||
return token
|
return token
|
||||||
|
|
||||||
def assertEqualTokens(self, a, b):
|
|
||||||
"""Assert that two tokens are equal.
|
|
||||||
|
|
||||||
Compare two tokens except for their ids. This also truncates
|
|
||||||
the time in the comparison.
|
|
||||||
"""
|
|
||||||
def normalize(token):
|
|
||||||
del token['token']['expires_at']
|
|
||||||
del token['token']['issued_at']
|
|
||||||
return token
|
|
||||||
|
|
||||||
a_expires_at = self.assertValidISO8601ExtendedFormatDatetime(
|
|
||||||
a['token']['expires_at'])
|
|
||||||
b_expires_at = self.assertValidISO8601ExtendedFormatDatetime(
|
|
||||||
b['token']['expires_at'])
|
|
||||||
self.assertCloseEnoughForGovernmentWork(a_expires_at, b_expires_at)
|
|
||||||
|
|
||||||
a_issued_at = self.assertValidISO8601ExtendedFormatDatetime(
|
|
||||||
a['token']['issued_at'])
|
|
||||||
b_issued_at = self.assertValidISO8601ExtendedFormatDatetime(
|
|
||||||
b['token']['issued_at'])
|
|
||||||
self.assertCloseEnoughForGovernmentWork(a_issued_at, b_issued_at)
|
|
||||||
|
|
||||||
return self.assertDictEqual(normalize(a), normalize(b))
|
|
||||||
|
|
||||||
# catalog validation
|
# catalog validation
|
||||||
|
|
||||||
def assertValidCatalogResponse(self, resp, *args, **kwargs):
|
def assertValidCatalogResponse(self, resp, *args, **kwargs):
|
||||||
@ -1249,18 +1224,6 @@ class RestfulTestCase(unit.SQLDriverOverrides, rest.RestfulTestCase,
|
|||||||
for attribute in attributes:
|
for attribute in attributes:
|
||||||
self.assertIsNotNone(entity.get(attribute))
|
self.assertIsNotNone(entity.get(attribute))
|
||||||
|
|
||||||
def assertValidServiceProviderListResponse(self, resp, *args, **kwargs):
|
|
||||||
if kwargs.get('keys_to_check') is None:
|
|
||||||
kwargs['keys_to_check'] = ['auth_url', 'id', 'enabled',
|
|
||||||
'description', 'relay_state_prefix',
|
|
||||||
'sp_url']
|
|
||||||
return self.assertValidListResponse(
|
|
||||||
resp,
|
|
||||||
'service_providers',
|
|
||||||
self.assertValidServiceProvider,
|
|
||||||
*args,
|
|
||||||
**kwargs)
|
|
||||||
|
|
||||||
def build_external_auth_request(self, remote_user,
|
def build_external_auth_request(self, remote_user,
|
||||||
remote_domain=None, auth_data=None,
|
remote_domain=None, auth_data=None,
|
||||||
kerberos=False):
|
kerberos=False):
|
||||||
|
Loading…
Reference in New Issue
Block a user