Fix tests under Python 3 and enable for Travis