Make tests work both locally and on travis-ci