Check if we're running in a virtual_env for travis

- also fixup unittests