Revise tests so it can be run in travis