refactor tests to support travis and coveralls