Make tests compatible with WTForms2
Refactor travis.yml