'Histograms should display for xmodules which are scored.'

def test_histogram_enabled_for_scored_xmodules(self):

    StudentModuleFactory.create(course_id=self.course.id, module_state_key=self.location, student=UserFactory(), grade=1, max_grade=1, state='{}')
    with patch('openedx.core.lib.xblock_utils.grade_histogram') as mock_grade_histogram:
        mock_grade_histogram.return_value = []
        module = render.get_module(self.user, self.request, self.location, self.field_data_cache)
        module.render(STUDENT_VIEW)
        self.assertTrue(mock_grade_histogram.called)
