"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/tests/unit/test_backend_ldap.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_backend_ldap.py  (keystone-16.0.0):test_backend_ldap.py  (keystone-16.0.1)
skipping to change at line 2084 skipping to change at line 2084
user1 = unit.new_user_ref(enabled=True, user1 = unit.new_user_ref(enabled=True,
domain_id=CONF.identity.default_domain_id) domain_id=CONF.identity.default_domain_id)
user_ref = PROVIDERS.identity_api.create_user(user1) user_ref = PROVIDERS.identity_api.create_user(user1)
self.assertIs(True, user_ref['enabled']) self.assertIs(True, user_ref['enabled'])
# Get a user and ensure they are enabled. # Get a user and ensure they are enabled.
user_ref = PROVIDERS.identity_api.get_user(user_ref['id']) user_ref = PROVIDERS.identity_api.get_user(user_ref['id'])
self.assertIs(True, user_ref['enabled']) self.assertIs(True, user_ref['enabled'])
# Ensure state matches the group config # Ensure state matches the group config
group_ref = PROVIDERS.identity_api.get_group_by_name(group_name, group_ref = PROVIDERS.identity_api.get_group_by_name(
CONF.identity.defau group_name, CONF.identity.default_domain_id)
lt_domain_id) PROVIDERS.identity_api.check_user_in_group(
PROVIDERS.identity_api.check_user_in_group(user_ref['id'], group_ref['id user_ref['id'], group_ref['id'])
'])
def test_user_enabled_use_group_config_with_ids(self): def test_user_enabled_use_group_config_with_ids(self):
# Establish enabled-emulation group name to later query its members # Establish enabled-emulation group name to later query its members
group_name = 'enabled_users' group_name = 'enabled_users'
driver = PROVIDERS.identity_api._select_identity_driver( driver = PROVIDERS.identity_api._select_identity_driver(
CONF.identity.default_domain_id) CONF.identity.default_domain_id)
group_dn = 'cn=%s,%s' % (group_name, driver.group.tree_dn) group_dn = 'cn=%s,%s' % (group_name, driver.group.tree_dn)
self.config_fixture.config( self.config_fixture.config(
group='ldap', group='ldap',
skipping to change at line 2117 skipping to change at line 2118
user1 = unit.new_user_ref(enabled=True, user1 = unit.new_user_ref(enabled=True,
domain_id=CONF.identity.default_domain_id) domain_id=CONF.identity.default_domain_id)
user_ref = PROVIDERS.identity_api.create_user(user1) user_ref = PROVIDERS.identity_api.create_user(user1)
self.assertIs(True, user_ref['enabled']) self.assertIs(True, user_ref['enabled'])
# Get a user and ensure they are enabled. # Get a user and ensure they are enabled.
user_ref = PROVIDERS.identity_api.get_user(user_ref['id']) user_ref = PROVIDERS.identity_api.get_user(user_ref['id'])
self.assertIs(True, user_ref['enabled']) self.assertIs(True, user_ref['enabled'])
# Ensure state matches the group config # Ensure state matches the group config
group_ref = PROVIDERS.identity_api.get_group_by_name(group_name, group_ref = PROVIDERS.identity_api.get_group_by_name(
CONF.identity.defau group_name, CONF.identity.default_domain_id)
lt_domain_id) PROVIDERS.identity_api.check_user_in_group(
PROVIDERS.identity_api.check_user_in_group(user_ref['id'], group_ref['id user_ref['id'], group_ref['id'])
'])
def test_user_enabled_invert(self): def test_user_enabled_invert(self):
self.config_fixture.config(group='ldap', user_enabled_invert=True, self.config_fixture.config(group='ldap', user_enabled_invert=True,
user_enabled_default='False') user_enabled_default='False')
self.ldapdb.clear() self.ldapdb.clear()
self.load_backends() self.load_backends()
user1 = self.new_user_ref(domain_id=CONF.identity.default_domain_id) user1 = self.new_user_ref(domain_id=CONF.identity.default_domain_id)
user2 = self.new_user_ref(enabled=False, user2 = self.new_user_ref(enabled=False,
 End of changes. 2 change blocks. 
10 lines changed or deleted 8 lines changed or added

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