'Verify that unrelated programs don\'t appear in the listing.'

def test_unrelated_program_not_listed(self, mock_get_programs):

    nonexistent_course_run_id = generate_course_run_key()
    course_run = CourseRunFactory(key=nonexistent_course_run_id)
    course = CatalogCourseFactory(course_runs=[course_run])
    unrelated_program = ProgramFactory(courses=[course])
    mock_get_programs.return_value = (self.programs + [unrelated_program])
    response = self.client.get(self.url)
    self.assert_related_programs(response)
    self.assertNotContains(response, unrelated_program['title'])
