"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/tests/unit/test_v3_oauth1.py" between
keystone-16.0.0.tar.gz and keystone-16.0.1.tar.gz

About: OpenStack Keystone (Core Service: Identity) provides an authentication and authorization service for other OpenStack services. Provides a catalog of endpoints for all OpenStack services.
The "Train" series (latest release).

test_v3_oauth1.py  (keystone-16.0.0):test_v3_oauth1.py  (keystone-16.0.1)
skipping to change at line 306 skipping to change at line 306
self.access_token = oauth1.Token(access_key, access_secret) self.access_token = oauth1.Token(access_key, access_secret)
self.assertIsNotNone(self.access_token.key) self.assertIsNotNone(self.access_token.key)
url, headers, body = self._get_oauth_token(self.consumer, url, headers, body = self._get_oauth_token(self.consumer,
self.access_token) self.access_token)
content = self.post(url, headers=headers, body=body) content = self.post(url, headers=headers, body=body)
self.keystone_token_id = content.headers['X-Subject-Token'] self.keystone_token_id = content.headers['X-Subject-Token']
self.keystone_token = content.result['token'] self.keystone_token = content.result['token']
self.assertIsNotNone(self.keystone_token_id) self.assertIsNotNone(self.keystone_token_id)
# add a new role assignment to ensure it is ignored in the access token
new_role = {'id': uuid.uuid4().hex, 'name': uuid.uuid4().hex}
PROVIDERS.role_api.create_role(new_role['id'], new_role)
PROVIDERS.assignment_api.add_role_to_user_and_project(
user_id=self.user_id,
project_id=self.project_id,
role_id=new_role['id'])
content = self.post(url, headers=headers, body=body)
token = content.result['token']
token_roles = [r['id'] for r in token['roles']]
self.assertIn(self.role_id, token_roles)
self.assertNotIn(new_role['id'], token_roles)
class AccessTokenCRUDTests(OAuthFlowTests): class AccessTokenCRUDTests(OAuthFlowTests):
def test_delete_access_token_dne(self): def test_delete_access_token_dne(self):
self.delete('/users/%(user)s/OS-OAUTH1/access_tokens/%(auth)s' self.delete('/users/%(user)s/OS-OAUTH1/access_tokens/%(auth)s'
% {'user': self.user_id, % {'user': self.user_id,
'auth': uuid.uuid4().hex}, 'auth': uuid.uuid4().hex},
expected_status=http_client.NOT_FOUND) expected_status=http_client.NOT_FOUND)
def test_list_no_access_tokens(self): def test_list_no_access_tokens(self):
url = ( url = (
'/users/%(user_id)s/OS-OAUTH1/access_tokens' '/users/%(user_id)s/OS-OAUTH1/access_tokens'
 End of changes. 1 change blocks. 
0 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)