Fix tests to work in travis ci