(self)
| 604 | ) |
| 605 | |
| 606 | def testForceDeleteBranch(self): |
| 607 | self.assertTrue(self.delete_restore_repo.get_branch(self.delete_restore_pull.head.ref)) |
| 608 | self.assertEqual(self.delete_restore_pull.delete_branch(force=True), None) |
| 609 | with self.assertRaises(github.UnknownObjectException) as raisedexp: |
| 610 | self.delete_restore_repo.get_branch(self.delete_restore_pull.head.ref) |
| 611 | self.assertEqual(raisedexp.exception.message, "Branch not found") |
| 612 | self.assertEqual(raisedexp.exception.status, 404) |
| 613 | self.assertEqual( |
| 614 | raisedexp.exception.data, |
| 615 | { |
| 616 | "documentation_url": "https://docs.github.com/rest/reference/repos#get-a-branch", |
| 617 | "message": "Branch not found", |
| 618 | }, |
| 619 | ) |
| 620 | |
| 621 | def testEnableAutomerge(self): |
| 622 | # To reproduce this, the PR repository need to have the "Allow auto-merge" option enabled |
nothing calls this directly
no test coverage detected