Merge "Remove the _is_v2 and _is_v3 helpers"
This commit is contained in:
commit
a724cf8673
@ -285,14 +285,6 @@ class _BIND_MODE(object):
|
||||
KERBEROS = 'kerberos'
|
||||
|
||||
|
||||
def _token_is_v2(token_info):
|
||||
return ('access' in token_info)
|
||||
|
||||
|
||||
def _token_is_v3(token_info):
|
||||
return ('token' in token_info)
|
||||
|
||||
|
||||
def _uncompress_pkiz(token):
|
||||
# TypeError If the signed_text is not zlib compressed binascii.Error if
|
||||
# signed_text has incorrect base64 padding (py34)
|
||||
|
@ -442,26 +442,6 @@ class GeneralAuthTokenMiddlewareTest(BaseAuthTokenMiddlewareTest,
|
||||
|
||||
resources = [('examples', client_fixtures.EXAMPLES_RESOURCE)]
|
||||
|
||||
def test_token_is_v2_accepts_v2(self):
|
||||
token = self.examples.UUID_TOKEN_DEFAULT
|
||||
token_response = self.examples.TOKEN_RESPONSES[token]
|
||||
self.assertTrue(auth_token._token_is_v2(token_response))
|
||||
|
||||
def test_token_is_v2_rejects_v3(self):
|
||||
token = self.examples.v3_UUID_TOKEN_DEFAULT
|
||||
token_response = self.examples.TOKEN_RESPONSES[token]
|
||||
self.assertFalse(auth_token._token_is_v2(token_response))
|
||||
|
||||
def test_token_is_v3_rejects_v2(self):
|
||||
token = self.examples.UUID_TOKEN_DEFAULT
|
||||
token_response = self.examples.TOKEN_RESPONSES[token]
|
||||
self.assertFalse(auth_token._token_is_v3(token_response))
|
||||
|
||||
def test_token_is_v3_accepts_v3(self):
|
||||
token = self.examples.v3_UUID_TOKEN_DEFAULT
|
||||
token_response = self.examples.TOKEN_RESPONSES[token]
|
||||
self.assertTrue(auth_token._token_is_v3(token_response))
|
||||
|
||||
def test_fixed_cache_key_length(self):
|
||||
self.set_middleware()
|
||||
short_string = uuid.uuid4().hex
|
||||
|
Loading…
Reference in New Issue
Block a user