'Tests exception when the course_id in CourseEmail is not the same as one explicitly passed in.'

def test_wrong_course_id_in_email(self):

    email = CourseEmail.create(CourseLocator('bogus', 'course', 'id'), self.instructor, [SEND_TO_MYSELF], 're:    subject', 'dummy    body    goes    here')
    entry = InstructorTask.create(self.course.id, 'task_type', 'task_key', 'task_input', self.instructor)
    task_input = {'email_id': email.id}
    with self.assertRaisesRegexp(ValueError, 'does    not    match    email    value'):
        perform_delegate_email_batches(entry.id, self.course.id, task_input, 'action_name')
