Merge "Run AuthWithToken against all token providers"

This commit is contained in:
Jenkins 2016-07-25 22:22:48 +00:00 committed by Gerrit Code Review
commit d57602c947
1 changed files with 20 additions and 2 deletions

View File

@ -256,7 +256,7 @@ class AuthBadRequests(AuthTest):
empty_request, body_dict)
class AuthWithToken(AuthTest):
class AuthWithToken(object):
def test_unscoped_token(self):
"""Verify getting an unscoped token with password creds."""
body_dict = _build_user_auth(username='FOO',
@ -614,7 +614,13 @@ class AuthWithToken(AuthTest):
return [None, None]
class FernetAuthWithToken(AuthWithToken):
class UUIDAuthWithToken(AuthWithToken, AuthTest):
def config_overrides(self):
super(UUIDAuthWithToken, self).config_overrides()
self.config_fixture.config(group='token', provider='uuid')
class FernetAuthWithToken(AuthWithToken, AuthTest):
def config_overrides(self):
super(FernetAuthWithToken, self).config_overrides()
self.config_fixture.config(group='token', provider='fernet')
@ -632,6 +638,18 @@ class FernetAuthWithToken(AuthWithToken):
self.skip_test_overrides('Fernet with v2.0 and revocation is broken')
class PKIAuthWithToken(AuthWithToken, AuthTest):
def config_overrides(self):
super(PKIAuthWithToken, self).config_overrides()
self.config_fixture.config(group='token', provider='pki')
class PKIZAuthWithToken(AuthWithToken, AuthTest):
def config_overrides(self):
super(PKIZAuthWithToken, self).config_overrides()
self.config_fixture.config(group='token', provider='pkiz')
class AuthWithPasswordCredentials(AuthTest):
def test_auth_invalid_user(self):
"""Verify exception is raised if invalid user."""