Fixed test failures on Python 3 - refs #12288