示例#1
0
    def __init__(self, gist_id, authentication=None):
        if authentication is None:
            gist = github3.gist(gist_id)
        else:
            gist = authentication.user.gist(gist_id)

        self.title = gist.description
        self.gist_files = { file.name : self.GistFile(file.content()) for file in gist.files() }
 def test_gist(self):
     args = (123,)
     github3.gist(*args)
     self.gh.gist.assert_called_with(*args)
示例#3
0
 def test_gist(self):
     expect(github3.gist(3156487)).isinstance(github3.gists.Gist)
示例#4
0
 def test_gist(self):
     """Show that github3.gist proxies to GitHub."""
     gist_id = 123
     github3.gist(gist_id)
     self.gh.gist.assert_called_once_with(gist_id)