Rewrote some tests to make them work on Travis