New unittests for hostgroup memberships

Issue #115