Esempio n. 1
0
 def test_status_rejected_doesnt_override_vote(self):
     # Test that approve sets the status of the merge proposal.
     self.context.vote = CodeReviewVote.NEEDS_FIXING
     command = UpdateStatusEmailCommand('status', ['rejected'])
     command.execute(self.context)
     self.assertEqual(
         BranchMergeProposalStatus.REJECTED,
         self.merge_proposal.queue_status)
     self.assertEqual(CodeReviewVote.NEEDS_FIXING, self.context.vote)
 def test_status_rejected_doesnt_override_vote(self):
     # Test that approve sets the status of the merge proposal.
     self.context.vote = CodeReviewVote.NEEDS_FIXING
     command = UpdateStatusEmailCommand('status', ['rejected'])
     command.execute(self.context)
     self.assertEqual(
         BranchMergeProposalStatus.REJECTED,
         self.merge_proposal.queue_status)
     self.assertEqual(CodeReviewVote.NEEDS_FIXING, self.context.vote)
Esempio n. 3
0
 def test_status_rejected(self):
     # Test that rejected sets the status of the merge proposal.
     self.assertNotEqual(
         BranchMergeProposalStatus.REJECTED,
         self.merge_proposal.queue_status)
     command = UpdateStatusEmailCommand('status', ['rejected'])
     command.execute(self.context)
     self.assertEqual(
         BranchMergeProposalStatus.REJECTED,
         self.merge_proposal.queue_status)
     # The vote is also set if it wasn't before.
     self.assertEqual(CodeReviewVote.DISAPPROVE, self.context.vote)
     # Commit the transaction to check database permissions.
     transaction.commit()
 def test_status_rejected(self):
     # Test that rejected sets the status of the merge proposal.
     self.assertNotEqual(
         BranchMergeProposalStatus.REJECTED,
         self.merge_proposal.queue_status)
     command = UpdateStatusEmailCommand('status', ['rejected'])
     command.execute(self.context)
     self.assertEqual(
         BranchMergeProposalStatus.REJECTED,
         self.merge_proposal.queue_status)
     # The vote is also set if it wasn't before.
     self.assertEqual(CodeReviewVote.DISAPPROVE, self.context.vote)
     # Commit the transaction to check database permissions.
     transaction.commit()