def test_getLabels(mockGithub): gh = GitHub(token='foo') gh.github = mockGithub repo = gh._getUser().create_repo() labels = gh._getLabels(repo) repo.get_labels.assert_called() assert len(labels) == 5
def test_deleteLabels(mockGithub): gh = GitHub(token='foo') gh.github = mockGithub repo = gh._getUser().create_repo() labels = gh._getLabels(repo) gh._deleteLabels(repo) for label in labels: label.delete.assert_called()