Add test coverage to course groups app

TNL-21

@jimabramson @andy-armstrong 
suggestion: rename `cohort_existed_previously` to `expected_error` which defaults to None and contains a string - if it's not None, assert the error response against the value, otherwise assert the success response.