'Test that no duplicate emails are sent to a course staff that is
not enrolled in the course, but is enrolled in other courses'

def test_no_duplicate_emails_unenrolled_staff(self):

    course_1 = CourseFactory.create()
    course_2 = CourseFactory.create()
    self.assertFalse(CourseEnrollment.is_enrolled(self.instructor, self.course.id))
    CourseEnrollment.enroll(self.instructor, course_1.id)
    CourseEnrollment.enroll(self.instructor, course_2.id)
    self.test_send_to_all()
