Fix tests to pass python 3