

def test_save_peer_review_on_response_question(self):
    client = self.get_logged_in_client()
    kwargs = {
        'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
    }
    response = client.post('/teacher/course/1/peer_review/1/save_peer_review', {
        'question_id': 4,
        'question_type': settings.RESPONSE_QUESTION_TYPE,
        'submission_id': 2,
        'marks': 5,
    }, **kwargs)
    json_string = response.content.decode(encoding='UTF-8')
    array = json.loads(json_string)
    self.assertEqual(response.status_code, 200)
    self.assertEqual(array['status'], 'success')
    self.assertEqual(array['message'], 'submitted')

dataset/ETHPy150Open AcademicsToday/py-academicstoday/academicstoday_project/teacher/tests/test_peer_review.py PeerReviewTestCase.test_save_peer_review_on_response_question/original