def test_role_scim2keystone_no_mandatory_fields(self): scim = { 'schemas': ['urn:scim:schemas:core:1.0', 'urn:scim:schemas:extension:keystone:1.0'], 'name': 'aRole' } keystone = { 'name': 'aRole', } self.assertEqual(keystone, conv.role_scim2key(scim))
def test_role_scim2keystone_no_mandatory_fields(self): scim = { 'schemas': [ 'urn:scim:schemas:core:1.0', 'urn:scim:schemas:extension:keystone:1.0' ], 'name': 'aRole' } keystone = { 'name': 'aRole', } self.assertEqual(keystone, conv.role_scim2key(scim))
def test_role_scim2keystone(self): scim = { 'schemas': ['urn:scim:schemas:extension:keystone:1.0'], 'id': '19041ee7679649879ada04417753ad4d', 'name': 'aRole', 'domain_id': '91d79dc2211d43a7985ebc27cdd146df' } keystone = { 'id': '19041ee7679649879ada04417753ad4d', 'name': '%s%s%s' % ('91d79dc2211d43a7985ebc27cdd146df', conv.ROLE_SEP, 'aRole') } self.assertEqual(keystone, conv.role_scim2key(scim))