def test_remove_label__label_exists(self): pull = GithubPullRequest(self.model) label_name = 'No lint errors' with add_ok_label(pull, label_name): pull.remove_label(label_name) pull.pull.issue().remove_label.assert_called_with(label_name)
def test_remove_label__label_exists(self): pull = GithubPullRequest(self.model) label_name = 'No lint errors' with add_ok_label(pull, label_name): pull.remove_label(label_name) pull.pull.issue().remove_label.assert_called_with(label_name)
def test_remove_label__label_missing(self): pull = GithubPullRequest(self.model) label_name = 'No lint errors' with add_ok_label(pull, 'Other label'): pull.remove_label(label_name) assert 0 == pull.pull.issue().remove_label.call_count
def test_remove_label__label_missing(self): pull = GithubPullRequest(self.model) label_name = 'No lint errors' with add_ok_label(pull, 'Other label'): pull.remove_label(label_name) assert 0 == pull.pull.issue().remove_label.call_count