Exemplo n.º 1
0
 def test_submit_for_review(self, mock_submit_for_review):
     node = StepInst(name='hello')
     node.assignees = ['student']
     node.reviewers = ['teacher']
     node.status = STATUS.IN_PROGRESS
     node.trigger('student')
     mock_submit_for_review.assert_called_once()
Exemplo n.º 2
0
 def test_in_progress_not_assignee(self):
     node = StepInst(name='hello')
     node.assignees = ['parent']
     node.reviewers = ['teacher']
     node.status = STATUS.IN_PROGRESS
     with self.assertRaises(CannotComplete):
         node.trigger('student')
Exemplo n.º 3
0
 def test_complete(self, mock_complete):
     node = StepInst(name='hello')
     node.assignees = ['student']
     node.reviewers = ['teacher']
     node.status = STATUS.READY_FOR_REVIEW
     node.trigger('teacher')
     mock_complete.assert_called_once()
Exemplo n.º 4
0
 def test_no_reviewer(self, mock_complete):
     node = StepInst(name='hello')
     node.assignees = ['student']
     node.status = STATUS.IN_PROGRESS
     node.trigger('student')
     mock_complete.assert_called_once()
Exemplo n.º 5
0
 def test_ready_for_review_not_reviewer(self):
     node = StepInst(name='hello')
     node.status = STATUS.READY_FOR_REVIEW
     node.reviewers = ['parent']
     with self.assertRaises(CannotComplete):
         node.trigger('teacher')