Fix tests to run on travis-ci