Python3 compat for a unit test.