(self)
| 156 | self.assertListKeyEqual(branch_protection.get_team_push_restrictions(), lambda u: u.slug, []) |
| 157 | |
| 158 | def testRemoveProtection(self): |
| 159 | self.assertTrue(self.protected_branch.protected) |
| 160 | self.protected_branch.remove_protection() |
| 161 | protected_branch = self.repo.get_branch("integrations") |
| 162 | self.assertFalse(protected_branch.protected) |
| 163 | with self.assertRaises(github.GithubException) as raisedexp: |
| 164 | protected_branch.get_protection() |
| 165 | self.assertEqual(raisedexp.exception.message, "Branch not protected") |
| 166 | self.assertEqual(raisedexp.exception.status, 404) |
| 167 | self.assertEqual( |
| 168 | raisedexp.exception.data, |
| 169 | { |
| 170 | "documentation_url": "https://developer.github.com/v3/repos/branches/#get-branch-protection", |
| 171 | "message": "Branch not protected", |
| 172 | }, |
| 173 | ) |
| 174 | |
| 175 | def testEditRequiredStatusChecks(self): |
| 176 | self.protected_branch.edit_required_status_checks(strict=True) |
nothing calls this directly
no test coverage detected