Fix tests on 2.7
Fix travis for python2.6