(self)
| 649 | self.pull.enable_automerge(merge_method="INVALID") |
| 650 | |
| 651 | def testEnableAutomergeError(self): |
| 652 | # To reproduce this, the PR repository need to have the "Allow auto-merge" option disabled |
| 653 | with pytest.raises(github.GithubException) as error: |
| 654 | self.pull.enable_automerge() |
| 655 | assert error.value.message is None |
| 656 | assert error.value.status == 400 |
| 657 | assert error.value.data == { |
| 658 | "data": {"enablePullRequestAutoMerge": None}, |
| 659 | "errors": [ |
| 660 | { |
| 661 | "locations": [{"column": 81, "line": 1}], |
| 662 | "message": "Pull request Auto merge is not allowed for this repository", |
| 663 | "path": ["enablePullRequestAutoMerge"], |
| 664 | "type": "UNPROCESSABLE", |
| 665 | } |
| 666 | ], |
| 667 | } |
| 668 | |
| 669 | def testDisableAutomerge(self): |
| 670 | response = self.pull.disable_automerge() |
nothing calls this directly
no test coverage detected