MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / testQueryGraphQlClass

Method testQueryGraphQlClass

tests/GraphQl.py:179–192  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

177 self.assertEqual(repo.html_url, "https://github.com/PyGithub/PyGithub")
178
179 def testQueryGraphQlClass(self):
180 requester = self.g._Github__requester
181 query = """
182 query Q($id: ID!) {
183 node(id: $id) { ... on DiscussionComment { url } }
184 }"""
185 variables = {"id": "DC_kwDOADYVqs4AU3Mg"}
186 comment = requester.graphql_query_class(
187 query, variables, ["node"], github.RepositoryDiscussionComment.RepositoryDiscussionComment
188 )
189 self.assertIsInstance(comment, github.RepositoryDiscussionComment.RepositoryDiscussionComment)
190 self.assertEqual(
191 comment.html_url, "https://github.com/PyGithub/PyGithub/discussions/2480#discussioncomment-5468960"
192 )
193
194 def testMutation(self):
195 requester = self.g._Github__requester

Callers

nothing calls this directly

Calls 1

graphql_query_classMethod · 0.80

Tested by

no test coverage detected