def test_create_org_repo(mock_Github): gh = GitHub(token='foo') gh.github = mock_Github org = gh._get_org('testOrg') gh._create_org_repo('testOrg', 'testRepo', 'foobar') org.create_repo.assert_called_with(name='testRepo', description='foobar', has_issues=True, auto_init=True, private=True)
def test_get_org(mock_Github): gh = GitHub(token='foo') gh.github = mock_Github gh._get_org('test') mock_Github.get_organization.assert_called_with('test')