Make testing function more solid
Merge pull request #153 from mojotech/cs/solid-tests

Make testing function more solid