fixed tests in py2 and py3