Also fixes tests that were broken on PyPy. Co-Authored-By: Jim Rollenhagen <jim@jimrollenhagen.com> Change-Id: I2554aa844b040c4c74cbf287dccb06d816a39dbe