Update tests to work with Python 3