Add unit tests

Built on top of #88.
Implements #87.
To activate requires adding an additional env line with `UNIT_TEST="1"`.
I think this line would raise a pep8 warning (no space after #)