fix tests in Py3