Issue 49586 - Add py3 support to plugins test suite
Description: Added py3 support by explicitly changing strings to bytes.
Added code for creating a new connection to make ldap communicate on localhost.
https://pagure.io/389-ds-base/issue/49586
Reviewed by: spichugi