Adapt tests to run on Python3