Add test coverage to course groups app

TNL-21

@jimabramson @andy-armstrong 
For these helper functions, I'm not sure if there is any permission checking. The only access control I've seen is in the views themselves.