Commit 8d64bfdb by Diana Huang

Update tests to handle rubric scores

parent 0852af3f
...@@ -50,7 +50,7 @@ class MockPeerGradingService(object): ...@@ -50,7 +50,7 @@ class MockPeerGradingService(object):
'max_score': 4}) 'max_score': 4})
def save_grade(self, location, grader_id, submission_id, def save_grade(self, location, grader_id, submission_id,
score, feedback, submission_key): score, feedback, submission_key, rubric_scores):
return json.dumps({'success': True}) return json.dumps({'success': True})
def is_student_calibrated(self, problem_location, grader_id): def is_student_calibrated(self, problem_location, grader_id):
...@@ -66,7 +66,7 @@ class MockPeerGradingService(object): ...@@ -66,7 +66,7 @@ class MockPeerGradingService(object):
'max_score': 4}) 'max_score': 4})
def save_calibration_essay(self, problem_location, grader_id, 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}) return json.dumps({'success': True, 'actual_score': 2})
def get_problem_list(self, course_id, grader_id): def get_problem_list(self, course_id, grader_id):
......
...@@ -171,7 +171,8 @@ class TestPeerGradingService(ct.PageLoader): ...@@ -171,7 +171,8 @@ class TestPeerGradingService(ct.PageLoader):
'submission_id': '1', 'submission_id': '1',
'submission_key': 'fake key', 'submission_key': 'fake key',
'score': '2', 'score': '2',
'feedback': 'This is feedback'} 'feedback': 'This is feedback',
'rubric_scores[]': [1, 2]}
r = self.check_for_post_code(200, url, data) r = self.check_for_post_code(200, url, data)
d = json.loads(r.content) d = json.loads(r.content)
self.assertTrue(d['success']) self.assertTrue(d['success'])
...@@ -236,7 +237,8 @@ class TestPeerGradingService(ct.PageLoader): ...@@ -236,7 +237,8 @@ class TestPeerGradingService(ct.PageLoader):
'submission_id': '1', 'submission_id': '1',
'submission_key': 'fake key', 'submission_key': 'fake key',
'score': '2', 'score': '2',
'feedback': 'This is feedback'} 'feedback': 'This is feedback',
'rubric_scores[]': [1, 2]}
r = self.check_for_post_code(200, url, data) r = self.check_for_post_code(200, url, data)
d = json.loads(r.content) d = json.loads(r.content)
self.assertTrue(d['success']) self.assertTrue(d['success'])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment