More Python3 compat in unit tests.