'Verify that a histogram has been created.'

@ddt.data(ModuleStoreEnum.Type.split, ModuleStoreEnum.Type.mongo)
def test_grade_histogram(self, store):

    course = CourseFactory.create(default_store=store)
    usage_key = course.id.make_usage_key('problem', 'first_problem')
    StudentModule.objects.create(student_id=1, grade=100, module_state_key=usage_key)
    StudentModule.objects.create(student_id=2, grade=50, module_state_key=usage_key)
    grades = grade_histogram(usage_key)
    self.assertEqual(grades[0], (50.0, 1))
    self.assertEqual(grades[1], (100.0, 1))
