fix tests for Python 3

Fix test for python 3