Tests now work with python3

A quick fix so that regression tests work in python3.