"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/tests/unit/common/test_notifications.py" between
keystone-15.0.0.tar.gz and keystone-15.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 "Stein" series (maintained release).

test_notifications.py  (keystone-15.0.0):test_notifications.py  (keystone-15.0.1)
skipping to change at line 1148 skipping to change at line 1148
In the case of role assignments, the event will have extra data, In the case of role assignments, the event will have extra data,
specifically, the role, target, actor, and if the role is inherited. specifically, the role, target, actor, and if the role is inherited.
An example event, as a dictionary is seen below: An example event, as a dictionary is seen below:
{ {
'typeURI': 'http://schemas.dmtf.org/cloud/audit/1.0/event', 'typeURI': 'http://schemas.dmtf.org/cloud/audit/1.0/event',
'initiator': { 'initiator': {
'typeURI': 'service/security/account/user', 'typeURI': 'service/security/account/user',
'host': {'address': 'localhost'}, 'host': {'address': 'localhost'},
'id': 'openstack:0a90d95d-582c-4efb-9cbc-e2ca7ca9c341', 'id': 'openstack:0a90d95d-582c-4efb-9cbc-e2ca7ca9c341',
'name': u'bccc2d9bfc2a46fd9e33bcf82f0b5c21' 'username': u'admin'
}, },
'target': { 'target': {
'typeURI': 'service/security/account/user', 'typeURI': 'service/security/account/user',
'id': 'openstack:d48ea485-ef70-4f65-8d2b-01aa9d7ec12d' 'id': 'openstack:d48ea485-ef70-4f65-8d2b-01aa9d7ec12d'
}, },
'observer': { 'observer': {
'typeURI': 'service/security', 'typeURI': 'service/security',
'id': 'openstack:d51dd870-d929-4aba-8d75-dcd7555a0c95' 'id': 'openstack:d51dd870-d929-4aba-8d75-dcd7555a0c95'
}, },
'eventType': 'activity', 'eventType': 'activity',
skipping to change at line 1194 skipping to change at line 1194
while self._notifications: while self._notifications:
self._notifications.pop() self._notifications.pop()
self.get_scoped_token() self.get_scoped_token()
self.assertEqual(len(self._notifications), 1) self.assertEqual(len(self._notifications), 1)
note = self._notifications.pop() note = self._notifications.pop()
initiator = note['initiator'] initiator = note['initiator']
self.assertEqual(self.user_id, initiator.id) self.assertEqual(self.user_id, initiator.id)
self.assertEqual(self.user_id, initiator.user_id) self.assertEqual(self.user_id, initiator.user_id)
def test_initiator_always_contains_username(self):
# Clear notifications
while self._notifications:
self._notifications.pop()
self.get_scoped_token()
self.assertEqual(len(self._notifications), 1)
note = self._notifications.pop()
initiator = note['initiator']
self.assertEqual(self.user['name'], initiator.username)
def test_v3_authenticate_user_name_and_domain_id(self): def test_v3_authenticate_user_name_and_domain_id(self):
user_id = self.user_id user_id = self.user_id
user_name = self.user['name'] user_name = self.user['name']
password = self.user['password'] password = self.user['password']
domain_id = self.domain_id domain_id = self.domain_id
data = self.build_authentication_request(username=user_name, data = self.build_authentication_request(username=user_name,
user_domain_id=domain_id, user_domain_id=domain_id,
password=password) password=password)
self.post('/auth/tokens', body=data) self.post('/auth/tokens', body=data)
self._assert_last_note(self.ACTION, user_id) self._assert_last_note(self.ACTION, user_id)
 End of changes. 2 change blocks. 
1 lines changed or deleted 12 lines changed or added

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