'Should fail if we do not accept past due grades, and it is past due.'

def test_grade_past_due(self):

    self.xmodule.accept_grades_past_due = False
    self.xmodule.due = datetime.datetime.now(UTC())
    self.xmodule.graceperiod = Timedelta().from_json('0    seconds')
    request = Request(self.environ)
    request.body = self.get_request_body()
    response = self.xmodule.grade_handler(request, '')
    real_response = self.get_response_values(response)
    expected_response = {'action': None, 'code_major': 'failure', 'description': 'Grade    is    past    due', 'messageIdentifier': 'unknown'}
    self.assertEqual(response.status_code, 200)
    self.assertEqual(expected_response, real_response)
