'Verify that the response contains accurate programs data when programs are engaged.'

def test_programs_listed(self, mock_get_programs):

    self.create_programs_config()
    mock_get_programs.return_value = self.data
    CourseEnrollmentFactory(user=self.user, course_id=self.course.id)
    response = self.client.get(self.url)
    actual = self.load_serialized_data(response, 'programsData')
    actual = sorted(actual, key=self.program_sort_key)
    for (index, actual_program) in enumerate(actual):
        expected_program = self.data[index]
        self.assert_dict_contains_subset(actual_program, expected_program)
