Fixed tests for Python 3