Update tests to handle rubric scores

This commit is contained in:
Diana Huang
2013-01-28 08:41:39 -05:00
parent 0852af3f35
commit 8d64bfdbdb
2 changed files with 6 additions and 4 deletions

View File

@@ -50,7 +50,7 @@ class MockPeerGradingService(object):
'max_score': 4})
def save_grade(self, location, grader_id, submission_id,
score, feedback, submission_key):
score, feedback, submission_key, rubric_scores):
return json.dumps({'success': True})
def is_student_calibrated(self, problem_location, grader_id):
@@ -66,7 +66,7 @@ class MockPeerGradingService(object):
'max_score': 4})
def save_calibration_essay(self, problem_location, grader_id,
calibration_essay_id, submission_key, score, feedback):
calibration_essay_id, submission_key, score, feedback, rubric_scores):
return json.dumps({'success': True, 'actual_score': 2})
def get_problem_list(self, course_id, grader_id):

View File

@@ -171,7 +171,8 @@ class TestPeerGradingService(ct.PageLoader):
'submission_id': '1',
'submission_key': 'fake key',
'score': '2',
'feedback': 'This is feedback'}
'feedback': 'This is feedback',
'rubric_scores[]': [1, 2]}
r = self.check_for_post_code(200, url, data)
d = json.loads(r.content)
self.assertTrue(d['success'])
@@ -236,7 +237,8 @@ class TestPeerGradingService(ct.PageLoader):
'submission_id': '1',
'submission_key': 'fake key',
'score': '2',
'feedback': 'This is feedback'}
'feedback': 'This is feedback',
'rubric_scores[]': [1, 2]}
r = self.check_for_post_code(200, url, data)
d = json.loads(r.content)
self.assertTrue(d['success'])