def test_warning_not_accepted_no_warning_when_accepted(phabdouble):
    revision = phabdouble.api_object_for(
        phabdouble.revision(status=RevisionStatus.ACCEPTED),
        attachments={"reviewers": True, "reviewers-extra": True, "projects": True},
    )

    assert warning_not_accepted(revision=revision) is None
def test_warning_not_accepted_warns_on_other_status(phabdouble, status):
    revision = phabdouble.api_object_for(
        phabdouble.revision(status=status),
        attachments={"reviewers": True, "reviewers-extra": True, "projects": True},
    )

    assert warning_not_accepted(revision=revision) is not None
Exemple #3
0
def test_warning_not_accepted_no_warning_when_accepted(phabdouble):
    phab = phabdouble.get_phabricator_client()
    r = phabdouble.revision(status=RevisionStatus.ACCEPTED)

    revision = phab.call_conduit(
        'differential.revision.search',
        constraints={'phids': [r['phid']]},
        attachments={
            'reviewers': True,
            'reviewers-extra': True,
        }
    )['data'][0]
    assert warning_not_accepted(revision=revision) is None
Exemple #4
0
def test_warning_not_accepted_warns_on_other_status(phabdouble, status):
    phab = phabdouble.get_phabricator_client()
    r = phabdouble.revision(status=status)

    revision = phab.call_conduit(
        'differential.revision.search',
        constraints={'phids': [r['phid']]},
        attachments={
            'reviewers': True,
            'reviewers-extra': True,
        }
    )['data'][0]
    assert warning_not_accepted(revision=revision) is not None
def test_warning_not_accepted_no_warning_when_accepted(phabdouble):
    phab = phabdouble.get_phabricator_client()
    r = phabdouble.revision(status=RevisionStatus.ACCEPTED)

    revision = phab.call_conduit(
        "differential.revision.search",
        constraints={"phids": [r["phid"]]},
        attachments={
            "reviewers": True,
            "reviewers-extra": True,
            "projects": True
        },
    )["data"][0]
    assert warning_not_accepted(revision=revision) is None
def test_warning_not_accepted_warns_on_other_status(phabdouble, status):
    phab = phabdouble.get_phabricator_client()
    r = phabdouble.revision(status=status)

    revision = phab.call_conduit(
        "differential.revision.search",
        constraints={"phids": [r["phid"]]},
        attachments={
            "reviewers": True,
            "reviewers-extra": True,
            "projects": True
        },
    )["data"][0]
    assert warning_not_accepted(revision=revision) is not None