Exemplo n.º 1
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 = ldap_core._get_connection(CONF.ldap.url, use_pool=True)
        self.assertIsInstance(handler, ldap_core.PooledLDAPHandler)
Exemplo n.º 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 = ldap_core._get_connection(CONF.ldap.url, use_pool=True)
        self.assertIsInstance(handler, ldap_core.PooledLDAPHandler)
Exemplo n.º 3
0
 def test_assert_connector_used_not_fake_ldap_pool(self):
     handler = ldap_core._get_connection(CONF.ldap.url, use_pool=True)
     self.assertNotEqual(type(handler.Connector),
                         type(fakeldap.FakeLdapPool))
     self.assertEqual(type(ldappool.StateConnector),
                      type(handler.Connector))
 def test_assert_connector_used_not_fake_ldap_pool(self):
     handler = ldap_core._get_connection(CONF.ldap.url, use_pool=True)
     self.assertNotEqual(type(handler.Connector),
                         type(fakeldap.FakeLdapPool))
     self.assertEqual(type(ldappool.StateConnector),
                      type(handler.Connector))