intg: Use bytes with hash function
Python3 expects bytes as an input for hash function.
We need to convert string to bytes before hashing
Traceback (most recent call last):
File "src/tests/intg/test_ldap.py", line 51, in ds_inst
ds_inst.setup()
File "src/tests/intg/ds_openldap.py", line 200, in setup
self._setup_config()
File "src/tests/intg/ds_openldap.py", line 76, in _setup_config
admin_pw_hash = hash_password(self.admin_pw)
File "src/tests/intg/ds_openldap.py", line 41, in hash_password
hash = hashlib.sha1(password)
TypeError: Unicode-objects must be encoded before hashing
Reviewed-by: Martin Basti <mbasti@redhat.com>
(cherry picked from commit e1711a2b2cb904f7edc26cc68566e064896d4f8a)