def test_check_author_planned_changes_changes_planned(phabdouble): revision = phabdouble.api_object_for( phabdouble.revision(status=RevisionStatus.CHANGES_PLANNED), attachments={ "reviewers": True, "reviewers-extra": True, "projects": True }, ) assert check_author_planned_changes(revision=revision) is not None
def test_check_author_planned_changes_changes_not_planned(phabdouble, status): revision = phabdouble.api_object_for( phabdouble.revision(status=status), attachments={ "reviewers": True, "reviewers-extra": True, "projects": True }, ) assert check_author_planned_changes(revision=revision) is None
def test_check_author_planned_changes_changes_planned(phabdouble): phab = phabdouble.get_phabricator_client() r = phabdouble.revision(status=RevisionStatus.CHANGES_PLANNED) revision = phab.call_conduit('differential.revision.search', constraints={'phids': [r['phid']]}, attachments={ 'reviewers': True, 'reviewers-extra': True, })['data'][0] assert check_author_planned_changes(revision=revision) is not None
def test_check_author_planned_changes_changes_planned(phabdouble): phab = phabdouble.get_phabricator_client() r = phabdouble.revision(status=RevisionStatus.CHANGES_PLANNED) revision = phab.call_conduit( "differential.revision.search", constraints={"phids": [r["phid"]]}, attachments={ "reviewers": True, "reviewers-extra": True, "projects": True }, )["data"][0] assert check_author_planned_changes(revision=revision) is not None