예제 #1
0
파일: exgist.py 프로젝트: evanhenri/exgist
    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() }
예제 #2
0
 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)