(self)
| 589 | self.assertTrue(self.delete_restore_repo.get_branch(self.delete_restore_pull.head.ref)) |
| 590 | |
| 591 | def testDeleteBranch(self): |
| 592 | self.assertTrue(self.delete_restore_repo.get_branch(self.delete_restore_pull.head.ref)) |
| 593 | self.delete_restore_pull.delete_branch(force=False) |
| 594 | with self.assertRaises(github.UnknownObjectException) as raisedexp: |
| 595 | self.delete_restore_repo.get_branch(self.delete_restore_pull.head.ref) |
| 596 | self.assertEqual(raisedexp.exception.message, "Branch not found") |
| 597 | self.assertEqual(raisedexp.exception.status, 404) |
| 598 | self.assertEqual( |
| 599 | raisedexp.exception.data, |
| 600 | { |
| 601 | "documentation_url": "https://docs.github.com/rest/reference/repos#get-a-branch", |
| 602 | "message": "Branch not found", |
| 603 | }, |
| 604 | ) |
| 605 | |
| 606 | def testForceDeleteBranch(self): |
| 607 | self.assertTrue(self.delete_restore_repo.get_branch(self.delete_restore_pull.head.ref)) |
nothing calls this directly
no test coverage detected