Fixed Py3k warnings in tests for issue #24731.
3 files changed