fix tests on py3