示例#1
0
    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))
示例#2
0
    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))
示例#3
0
    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))
示例#4
0
    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))