'Tests exception when the cohort or course mode doesn\'t exist'

@ddt.data('track', 'cohort')
def test_nonexistent_grouping(self, target_type):

    with self.assertRaisesRegexp(ValueError, '.*    IDONTEXIST    does    not    exist    .*'):
        email = CourseEmail.create(self.course.id, self.instructor, ['{}:IDONTEXIST'.format(target_type)], 're:    subject', 'dummy    body    goes    here')
