def test_handler_with_use_pool_enabled(self):
        # by default use_pool and use_auth_pool is enabled in test pool config
        user_ref = self.identity_api.get_user(self.user_foo['id'])
        self.user_foo.pop('password')
        self.assertDictEqual(self.user_foo, user_ref)

        handler = common_ldap._get_connection(CONF.ldap.url, use_pool=True)
        self.assertIsInstance(handler, common_ldap.PooledLDAPHandler)
Exemple #2
0
    def test_handler_with_use_pool_enabled(self):
        # by default use_pool and use_auth_pool is enabled in test pool config
        user_ref = self.identity_api.get_user(self.user_foo['id'])
        self.user_foo.pop('password')
        self.assertDictEqual(self.user_foo, user_ref)

        handler = common_ldap._get_connection(CONF.ldap.url, use_pool=True)
        self.assertIsInstance(handler, common_ldap.PooledLDAPHandler)
 def test_assert_connector_used_not_fake_ldap_pool(self):
     handler = ldap_common._get_connection(CONF.ldap.url, use_pool=True)
     self.assertNotEqual(type(handler.Connector),
                         type(fakeldap.FakeLdapPool))
     self.assertEqual(type(ldappool.StateConnector),
                      type(handler.Connector))
Exemple #4
0
 def test_assert_connector_used_not_fake_ldap_pool(self):
     handler = ldap_common._get_connection(CONF.ldap.url, use_pool=True)
     self.assertNotEqual(type(handler.Connector),
                         type(fakeldap.FakeLdapPool))
     self.assertEqual(type(ldappool.StateConnector),
                      type(handler.Connector))