Ejemplo n.º 1
0
 def test_get_author_null(self, mocked_gql: Any) -> None:
     """ Tests that PR author can be computed
         If reply contains NULL
     """
     pr = GitHubPR("pytorch", "pytorch", 71759)
     author = pr.get_author()
     self.assertTrue(author is not None)
     self.assertTrue("@" in author)
     self.assertTrue(pr.get_diff_revision() is None)
Ejemplo n.º 2
0
    def test_get_author_null(self, mocked_gql: Any) -> None:
        """ Tests that PR author can be computed
            If reply contains NULL
        """
        pr = GitHubPR("pytorch", "pytorch", 71759)
        author = pr.get_author()
        self.assertTrue(author is not None)
        self.assertTrue("@" in author)
        self.assertTrue(pr.get_diff_revision() is None)

        # PR with multiple contributors, but creator id is not among authors
        pr = GitHubPR("pytorch", "pytorch", 75095)
        self.assertEqual(pr.get_pr_creator_login(), "mruberry")
        author = pr.get_author()
        self.assertTrue(author is not None)