def test_B_AcceptedPersistsWhenUpdated(self):
     conduit = self.phabConduit
     author = phldef_conduit.ALICE.user
     reviewer = phldef_conduit.BOB.user
     with phlsys_conduit.act_as_user_context(conduit, author):
         revision = phlcon_differential.create_empty_revision(conduit)
     with phlsys_conduit.act_as_user_context(conduit, reviewer):
         phlcon_differential.create_comment(conduit, revision, action=phlcon_differential.Action.accept)
     with phlsys_conduit.act_as_user_context(conduit, author):
         phlcon_differential.update_revision_empty(conduit, revision)
     self.assertEqual(
         phlcon_differential.get_revision_status(conduit, revision), phlcon_differential.ReviewStates.accepted
     )
    def testCreateUpdateEmptyRevision(self):
        conduit = phlsys_conduit.Conduit(
            self.test_data.TEST_URI, self.test_data.PHAB.user, self.test_data.PHAB.certificate
        )
        author = phldef_conduit.ALICE.user
        with phlsys_conduit.act_as_user_context(conduit, author):
            revision_id = phlcon_differential.create_empty_revision(conduit)

        revision_list = phlcon_differential.query(conduit, [revision_id])
        self.assertEqual(len(revision_list), 1)

        with phlsys_conduit.act_as_user_context(conduit, author):
            phlcon_differential.update_revision_empty(conduit, revision_id)
Пример #3
0
    def testCreateUpdateEmptyRevision(self):
        conduit = phlsys_conduit.Conduit(
            self.test_data.TEST_URI,
            self.test_data.PHAB.user,
            self.test_data.PHAB.certificate)
        author = phldef_conduit.ALICE.user
        with phlsys_conduit.act_as_user_context(conduit, author):
            revision_id = phlcon_differential.create_empty_revision(conduit)

        revision_list = phlcon_differential.query(conduit, [revision_id])
        self.assertEqual(len(revision_list), 1)

        with phlsys_conduit.act_as_user_context(conduit, author):
            phlcon_differential.update_revision_empty(conduit, revision_id)
Пример #4
0
 def test_B_AcceptedPersistsWhenUpdated(self):
     conduit = self.phabConduit
     author = phldef_conduit.ALICE.user
     reviewer = phldef_conduit.BOB.user
     with phlsys_conduit.act_as_user_context(conduit, author):
         revision = phlcon_differential.create_empty_revision(conduit)
     with phlsys_conduit.act_as_user_context(conduit, reviewer):
         phlcon_differential.create_comment(
             conduit,
             revision,
             action=phlcon_differential.Action.accept)
     with phlsys_conduit.act_as_user_context(conduit, author):
         phlcon_differential.update_revision_empty(conduit, revision)
     self.assertEqual(
         phlcon_differential.get_revision_status(conduit, revision),
         phlcon_differential.ReviewStates.accepted)