refactor: make TestFetchRevocationList test uuid

The TestFetchRevocationList should be inherited and tested by the uuid token
provider. The other token providers don't support Revocation Lists, so don't
test them with it.

This is an effort to break https://review.openstack.org/#/c/258650 into
smaller, more reviewable pieces.

Co-Authored-By: Raildo Mascena <raildo@lsd.ufcg.edu.br>
Co-Authored-By: Adam Young <ayound@redhat.com>

Change-Id: I6be1c5c583d336cc83cf3670c10d4364ddc16bbd
Partial-Bug: 1561054
This commit is contained in:
Lance Bragstad 2016-07-20 23:25:15 +00:00
parent 05ec032877
commit d6ac15cda7
1 changed files with 13 additions and 1 deletions

View File

@ -5071,7 +5071,7 @@ class TestAuthTOTP(test_v3.RestfulTestCase):
self.v3_create_token(auth_data, expected_status=http_client.CREATED)
class TestFetchRevocationList(test_v3.RestfulTestCase):
class TestFetchRevocationList(object):
"""Test fetch token revocation list on the v3 Identity API."""
def config_overrides(self):
@ -5150,3 +5150,15 @@ class TestFetchRevocationList(test_v3.RestfulTestCase):
}
self.assertEqual({'revoked': [exp_token_revoke_data]}, res.json)
class UUIDFetchRevocationList(TestFetchRevocationList,
test_v3.RestfulTestCase):
def config_overrides(self):
super(UUIDFetchRevocationList, self).config_overrides()
self.config_fixture.config(group='token', provider='uuid')
# NOTE(lbragstad): The Fernet token provider doesn't use Revocation lists so
# don't inherit TestFetchRevocationList here to test it.