python3: Fix traceback while running tests.

Fix:

TypeError: Unicode-objects must be encoded before hashing

while running tests. This is due to the fact in python3 hashlib.md5
works with bytes and we are passing unicode strings.

Change-Id: I0adde942423af28572473030f6685e12cd8f7dae
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Merge "python3: Fix traceback while running tests."