def test_check_diff_author_is_known_with_unknown_author(phabdouble): # No commits for no author data. d = phabdouble.diff(commits=[]) phabdouble.revision(diff=d, repo=phabdouble.repo()) diff = phabdouble.api_object_for(d, attachments={"commits": True}) assert check_diff_author_is_known(diff=diff) is not None
def test_check_diff_author_is_known_with_author(phabdouble): # Adds author information by default. d = phabdouble.diff() phabdouble.revision(diff=d, repo=phabdouble.repo()) diff = phabdouble.api_object_for(d, attachments={"commits": True}) assert check_diff_author_is_known(diff=diff) is None
def test_check_diff_author_is_known_with_unknown_author(phabdouble): phab = phabdouble.get_phabricator_client() # No commits for no author data. d = phabdouble.diff(commits=[]) phabdouble.revision(diff=d, repo=phabdouble.repo()) diff = phab.call_conduit('differential.diff.search', constraints={'phids': [d['phid']]}, attachments={'commits': True})['data'][0] assert check_diff_author_is_known(diff=diff) is not None
def test_check_diff_author_is_known_with_author(phabdouble): phab = phabdouble.get_phabricator_client() # Adds author information by default. d = phabdouble.diff() phabdouble.revision(diff=d, repo=phabdouble.repo()) diff = phab.call_conduit('differential.diff.search', constraints={'phids': [d['phid']]}, attachments={'commits': True})['data'][0] assert check_diff_author_is_known(diff=diff) is None
def test_check_diff_author_is_known_with_unknown_author(phabdouble): phab = phabdouble.get_phabricator_client() # No commits for no author data. d = phabdouble.diff(commits=[]) phabdouble.revision(diff=d, repo=phabdouble.repo()) diff = phab.call_conduit( "differential.diff.search", constraints={"phids": [d["phid"]]}, attachments={"commits": True}, )["data"][0] assert check_diff_author_is_known(diff=diff) is not None
def test_check_diff_author_is_known_with_author(phabdouble): phab = phabdouble.get_phabricator_client() # Adds author information by default. d = phabdouble.diff() phabdouble.revision(diff=d, repo=phabdouble.repo()) diff = phab.call_conduit( "differential.diff.search", constraints={"phids": [d["phid"]]}, attachments={"commits": True}, )["data"][0] assert check_diff_author_is_known(diff=diff) is None