"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/tests/unit/test_v3_credential.py" between
keystone-17.0.0.tar.gz and keystone-18.0.0.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 "Victoria" series (latest release).

test_v3_credential.py  (keystone-17.0.0):test_v3_credential.py  (keystone-18.0.0)
skipping to change at line 407 skipping to change at line 407
expected_status=http.client.BAD_REQUEST) expected_status=http.client.BAD_REQUEST)
# Try removing the access token # Try removing the access token
del blob['access_token_id'] del blob['access_token_id']
update_ref = {'blob': json.dumps(blob)} update_ref = {'blob': json.dumps(blob)}
self.patch( self.patch(
'/credentials/%(credential_id)s' % { '/credentials/%(credential_id)s' % {
'credential_id': credential_id}, 'credential_id': credential_id},
body={'credential': update_ref}, body={'credential': update_ref},
expected_status=http.client.BAD_REQUEST) expected_status=http.client.BAD_REQUEST)
def test_update_ec2_credential_change_access_id(self):
"""Call ``PATCH /credentials/{credential_id}``."""
blob, ref = unit.new_ec2_credential(user_id=self.user['id'],
project_id=self.project_id)
blob['access_id'] = uuid.uuid4().hex
ref['blob'] = json.dumps(blob)
r = self.post(
'/credentials',
body={'credential': ref})
self.assertValidCredentialResponse(r, ref)
credential_id = r.result.get('credential')['id']
# Try changing to a different access_id
blob['access_id'] = uuid.uuid4().hex
update_ref = {'blob': json.dumps(blob)}
self.patch(
'/credentials/%(credential_id)s' % {
'credential_id': credential_id},
body={'credential': update_ref},
expected_status=http.client.BAD_REQUEST)
# Try removing the access_id
del blob['access_id']
update_ref = {'blob': json.dumps(blob)}
self.patch(
'/credentials/%(credential_id)s' % {
'credential_id': credential_id},
body={'credential': update_ref},
expected_status=http.client.BAD_REQUEST)
def test_delete_credential(self): def test_delete_credential(self):
"""Call ``DELETE /credentials/{credential_id}``.""" """Call ``DELETE /credentials/{credential_id}``."""
self.delete( self.delete(
'/credentials/%(credential_id)s' % { '/credentials/%(credential_id)s' % {
'credential_id': self.credential['id']}) 'credential_id': self.credential['id']})
def test_delete_credential_retries_on_deadlock(self): def test_delete_credential_retries_on_deadlock(self):
patcher = mock.patch('sqlalchemy.orm.query.Query.delete', patcher = mock.patch('sqlalchemy.orm.query.Query.delete',
autospec=True) autospec=True)
 End of changes. 1 change blocks. 
0 lines changed or deleted 28 lines changed or added

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