def test_get_labels(mock_Github): gh = GitHub(token='foo') gh.github = mock_Github repo = gh._get_user().create_repo() labels = gh._get_labels(repo) repo.get_labels.assert_called() assert len(labels) == 5
def test_delete_labels(mock_Github): gh = GitHub(token='foo') gh.github = mock_Github repo = gh._get_user().create_repo() labels = gh._get_labels(repo) gh._delete_labels(repo) for label in labels: label.delete.assert_called()