Fix test for ldap.search return codes

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>