Fix tests on py2