"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/tests/unit/test_backend_ldap.py" between
keystone-16.0.1.tar.gz and keystone-16.0.2.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 (maintained release).

test_backend_ldap.py  (keystone-16.0.1):test_backend_ldap.py  (keystone-16.0.2)
skipping to change at line 2216 skipping to change at line 2216
mixin_impl = driver.user mixin_impl = driver.user
# ) is a special char in a filter and must be escaped. # ) is a special char in a filter and must be escaped.
sample_dn = 'cn=foo)bar' sample_dn = 'cn=foo)bar'
# LDAP requires ) is escaped by being replaced with "\29" # LDAP requires ) is escaped by being replaced with "\29"
sample_dn_filter_esc = r'cn=foo\29bar' sample_dn_filter_esc = r'cn=foo\29bar'
# Override the tree_dn, it's used to build the enabled member filter # Override the tree_dn, it's used to build the enabled member filter
mixin_impl.tree_dn = sample_dn mixin_impl.tree_dn = sample_dn
# The filter that _get_enabled is going to build contains the # The filter, which _is_id_enabled is going to build, contains the
# tree_dn, which better be escaped in this case. # tree_dn, which better be escaped in this case.
exp_filter = '(%s=%s=%s,%s)' % ( exp_filter = '(%s=%s=%s,%s)' % (
mixin_impl.member_attribute, mixin_impl.id_attr, object_id, mixin_impl.member_attribute, mixin_impl.id_attr, object_id,
sample_dn_filter_esc) sample_dn_filter_esc)
with mixin_impl.get_connection() as conn: with mixin_impl.get_connection() as conn:
m = self.useFixture( m = self.useFixture(
fixtures.MockPatchObject(conn, 'search_s')).mock fixtures.MockPatchObject(conn, 'search_s')).mock
mixin_impl._get_enabled(object_id, conn) mixin_impl._is_id_enabled(object_id, conn)
# The 3rd argument is the DN. # The 3rd argument is the DN.
self.assertEqual(exp_filter, m.call_args[0][2]) self.assertEqual(exp_filter, m.call_args[0][2])
class LDAPPosixGroupsTest(LDAPTestSetup, unit.TestCase): class LDAPPosixGroupsTest(LDAPTestSetup, unit.TestCase):
def assert_backends(self): def assert_backends(self):
_assert_backends(self, identity='ldap') _assert_backends(self, identity='ldap')
def config_overrides(self): def config_overrides(self):
super(LDAPPosixGroupsTest, self).config_overrides() super(LDAPPosixGroupsTest, self).config_overrides()
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

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