Example #1
0
 def test_returns_none_on_new_draft(self):
     self.repo.releases._releases = [{
         'tag_name':
         'old',
         'allow_published_release_updates':
         False
     }]
     upload.get_release(self.repo, 'new', False)
     self.assertEquals(upload.get_release(self.repo, 'test', False), None)
Example #2
0
 def test_returns_existing_draft(self):
     self.repo.releases._releases = [{
         'tag_name':
         'test',
         'allow_published_release_updates':
         False
     }]
     self.assertEquals(upload.get_release(self.repo, 'test', False), None)
Example #3
0
 def test_returns_none_on_new_draft(self):
     self.repo.releases._releases = [{'tag_name': 'old', 'draft': False}]
     upload.get_release(self.repo, 'new', False)
     self.assertEquals(upload.get_release(self.repo, 'test'), None)
Example #4
0
 def test_returns_existing_draft(self):
     self.repo.releases._releases = [{'tag_name': 'test', 'draft': True}]
     self.assertEquals(
         upload.get_release(self.repo, 'test')['tag_name'], 'test', False)