Fix up tests for python 3