Commit ed1f7ea5 by muzaffaryousaf

Minor refactoring for cancelled peer workflow test.

TNL-900
parent 143fe3ac
...@@ -908,8 +908,8 @@ class TestPeerApi(CacheResetTest): ...@@ -908,8 +908,8 @@ class TestPeerApi(CacheResetTest):
PeerWorkflow.create_item(buffy_workflow, xander_sub["uuid"]) PeerWorkflow.create_item(buffy_workflow, xander_sub["uuid"])
# Check to see if Buffy is actively reviewing Xander's submission. # Check to see if Buffy is actively reviewing Xander's submission.
item = buffy_workflow.find_active_assessments() submission = peer_api.get_submission_to_assess(buffy_sub['uuid'], 1)
self.assertEqual(xander_sub["uuid"], item.submission_uuid) self.assertEqual(xander_sub["uuid"], submission['uuid'])
# Cancel the Xander's submission. # Cancel the Xander's submission.
xander_workflow = PeerWorkflow.get_by_submission_uuid(xander_sub['uuid']) xander_workflow = PeerWorkflow.get_by_submission_uuid(xander_sub['uuid'])
...@@ -919,8 +919,8 @@ class TestPeerApi(CacheResetTest): ...@@ -919,8 +919,8 @@ class TestPeerApi(CacheResetTest):
# Check to see if Buffy is actively reviewing Xander's submission. # Check to see if Buffy is actively reviewing Xander's submission.
# She isn't able to get the submission to assess. # She isn't able to get the submission to assess.
item = buffy_workflow.find_active_assessments() submission = peer_api.get_submission_to_assess(buffy_sub['uuid'], 1)
self.assertIsNone(item) self.assertIsNone(submission)
# Try to assess the cancelled submission # Try to assess the cancelled submission
# This will raise PeerAssessmentWorkflowError # This will raise PeerAssessmentWorkflowError
......
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