Python3 fix in tests