Merge "Add a test for modifying a role to set the name the same"
This commit is contained in:
commit
f68f26f5cd
|
@ -3671,6 +3671,13 @@ class IdentityTests(object):
|
|||
{'description': uuid.uuid4().hex})
|
||||
# If the previous line didn't raise an exception then the test passes.
|
||||
|
||||
def test_update_role_same_name(self):
|
||||
# A user can update a role and set the name to be the same as it was.
|
||||
|
||||
self.assignment_api.update_role(self.role_member['id'],
|
||||
{'name': self.role_member['name']})
|
||||
# If the previous line didn't raise an exception then the test passes.
|
||||
|
||||
|
||||
class TokenTests(object):
|
||||
def _create_token_id(self):
|
||||
|
|
|
@ -1916,6 +1916,14 @@ class LDAPIdentity(BaseLDAPIdentity, tests.TestCase):
|
|||
self.assertEqual('crap', user_ref['id'])
|
||||
self.assertEqual('Foo Bar', user_ref['name'])
|
||||
|
||||
def test_update_role_same_name(self):
|
||||
# Override
|
||||
# This test is failing using the LDAP assignment backend, see
|
||||
# bug 1401721.
|
||||
# FIXME(blk-u): This should work.
|
||||
self.assertRaises(exception.Conflict,
|
||||
super(LDAPIdentity, self).test_update_role_same_name)
|
||||
|
||||
|
||||
class LDAPIdentityEnabledEmulation(LDAPIdentity):
|
||||
def setUp(self):
|
||||
|
|
Loading…
Reference in New Issue