Fix unitary tests

Fix python3 compat.