Fix Python2 tests.