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)
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)
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)
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)