"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/tests/protection/v3/test_assignment.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_assignment.py  (keystone-16.0.0):test_assignment.py  (keystone-16.0.1)
skipping to change at line 386 skipping to change at line 386
'/v3/role_assignments?group.id=%s' % group_id, '/v3/role_assignments?group.id=%s' % group_id,
headers=self.headers headers=self.headers
) )
self.assertEqual(len(expected), len(r.json['role_assignments'])) self.assertEqual(len(expected), len(r.json['role_assignments']))
actual = self._extract_role_assignments_from_response_body(r) actual = self._extract_role_assignments_from_response_body(r)
for assignment in actual: for assignment in actual:
self.assertIn(assignment, expected) self.assertIn(assignment, expected)
def test_user_can_filter_role_assignments_by_role(self): def test_user_can_filter_role_assignments_by_role(self):
assignments = self._setup_test_role_assignments() assignments = self._setup_test_role_assignments()
self.expected = [ra for ra in self.expected
if ra['role_id'] == assignments['role_id']]
self.expected.append({ self.expected.append({
'user_id': assignments['user_id'], 'user_id': assignments['user_id'],
'project_id': assignments['project_id'], 'project_id': assignments['project_id'],
'role_id': assignments['role_id'] 'role_id': assignments['role_id']
}) })
self.expected.append({ self.expected.append({
'user_id': assignments['user_id'], 'user_id': assignments['user_id'],
'domain_id': assignments['domain_id'], 'domain_id': assignments['domain_id'],
'role_id': assignments['role_id'] 'role_id': assignments['role_id']
}) })
skipping to change at line 485 skipping to change at line 487
'/v3/role_assignments?scope.domain.id=%s&role.id=%s' % qs, '/v3/role_assignments?scope.domain.id=%s&role.id=%s' % qs,
headers=self.headers headers=self.headers
) )
self.assertEqual(len(expected), len(r.json['role_assignments'])) self.assertEqual(len(expected), len(r.json['role_assignments']))
actual = self._extract_role_assignments_from_response_body(r) actual = self._extract_role_assignments_from_response_body(r)
for assignment in actual: for assignment in actual:
self.assertIn(assignment, expected) self.assertIn(assignment, expected)
def test_user_can_filter_role_assignments_by_system_and_role(self): def test_user_can_filter_role_assignments_by_system_and_role(self):
assignments = self._setup_test_role_assignments() assignments = self._setup_test_role_assignments()
self.expected = [ra for ra in self.expected
if ra['role_id'] == assignments['role_id']]
self.expected.append({ self.expected.append({
'user_id': assignments['user_id'], 'user_id': assignments['user_id'],
'system': 'all', 'system': 'all',
'role_id': assignments['role_id'] 'role_id': assignments['role_id']
}) })
self.expected.append({ self.expected.append({
'group_id': assignments['group_id'], 'group_id': assignments['group_id'],
'system': 'all', 'system': 'all',
'role_id': assignments['role_id'] 'role_id': assignments['role_id']
}) })
 End of changes. 2 change blocks. 
0 lines changed or deleted 4 lines changed or added

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