Remove string from URL in list_revoke_events()
The extra string is causing the self URL to be "/OS-REVOKE/events/events" instead of just "OS-REVOKE/events". Change-Id: I3b4e53ffabee5156b2b82b5831cfe23e98527a3a Closes-Bug: 1384457
This commit is contained in:
parent
60266bbfbf
commit
c3393fb33c
|
@ -38,7 +38,7 @@ class RevokeController(controller.V3Controller):
|
|||
'next': None,
|
||||
'self': RevokeController.base_url(
|
||||
context,
|
||||
path=context['path']) + '/events',
|
||||
path=context['path']),
|
||||
'previous': None}
|
||||
}
|
||||
return response
|
||||
|
|
|
@ -15,6 +15,7 @@ import uuid
|
|||
|
||||
from oslo.utils import timeutils
|
||||
import six
|
||||
from testtools import matchers
|
||||
|
||||
from keystone.common import dependency
|
||||
from keystone.contrib.revoke import model
|
||||
|
@ -66,6 +67,12 @@ class OSRevokeTests(test_v3.RestfulTestCase, test_v3.JsonHomeTestMixin):
|
|||
del (event['issued_before'])
|
||||
self.assertEqual(sample, event)
|
||||
|
||||
def test_revoked_list_self_url(self):
|
||||
revoked_list_url = '/OS-REVOKE/events'
|
||||
resp = self.get(revoked_list_url)
|
||||
links = resp.json_body['links']
|
||||
self.assertThat(links['self'], matchers.EndsWith(revoked_list_url))
|
||||
|
||||
def test_revoked_token_in_list(self):
|
||||
user_id = uuid.uuid4().hex
|
||||
expires_at = provider.default_expire_time()
|
||||
|
|
Loading…
Reference in New Issue