Ejemplo n.º 1
0
 def __init__(self, repository, reference):
     self.reference = reference
     self.repository = repository
     try:
         self.pull_request = github3.pull_request(repository.username, repository.project, reference)
         self.title = self.pull_request.title
         self.status = self.get_status()
     except:
         self.status = ('link', '?')
         self.title = 'Ticket %s in %s (Error while fetching external data)' % (self.reference, self.repository.name)
Ejemplo n.º 2
0
 def test_pull_request(self):
     args = ('owner', 'repo', 1)
     github3.pull_request(*args)
     self.gh.pull_request.assert_called_with(*args)
Ejemplo n.º 3
0
 def test_pull_request(self):
     """Show that github3.pull_request proxies to GitHub."""
     github3.pull_request('sigmavirus24', 'github3.py', 24)
     self.gh.pull_request.assert_called_once_with('sigmavirus24',
                                                  'github3.py', 24)