'Tests the publish mechanism'

def test_xmodule_runtime_publish(self):

    self.set_module_grade_using_publish(self.grade_dict)
    student_module = StudentModule.objects.get(student=self.student_user, module_state_key=self.problem.location)
    self.assertEqual(student_module.grade, self.grade_dict['value'])
    self.assertEqual(student_module.max_grade, self.grade_dict['max_value'])
