Fix python3 / python2 issue in tests

If I run tests using `python3 runtests.py`, I get a failure because my
python binary is python2.

Refs #24007