コード例 #1
0
def test_create_column(mock_Github):
    gh = GitHub(token='foo')
    gh.github = mock_Github
    repo = gh._get_user().create_repo()
    project = gh._create_project(repo, 'testOrg', 'testBody')
    gh._create_column(project, 'test')

    project.create_column.assert_called_with('test')
コード例 #2
0
def test_create_card(mock_Github):
    gh = GitHub(token='foo')
    gh.github = mock_Github
    repo = gh._get_user().create_repo()
    project = gh._create_project(repo, 'testOrg', 'testBody')
    column = gh._create_column(project, 'test')
    issue = gh._create_issue(repo, 'testMilestone', 'testTitle', 'testBody',
                             [])
    gh._create_card(column, issue)

    column.create_card.assert_called_with(content_id=issue.id,
                                          content_type="Issue")