Fixed tests for py2/py3 compatibility.
Ugly fix but its working.