mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
This adds argument `auth` and deprecates `login_or_token`, `password`, `jwt`, and `app_auth` arguments of `github.Github`. This adds argument `auth` and deprecates `integration_id`, `private_key` of `github.GithubIntegration`. This deprecates the `create_jwt` method of `github.GithubIntegration`, replaced by `github.Auth.AppAuth.create_jwt`.
27 lines
789 B
Python
27 lines
789 B
Python
import github
|
|
|
|
from . import Framework
|
|
|
|
REPO_NAME = "PyGithub/PyGithub"
|
|
|
|
|
|
class PoolSize(Framework.TestCase):
|
|
def setUp(self):
|
|
Framework.setPoolSize(20)
|
|
super().setUp()
|
|
|
|
def testReturnsRepoAfterSettingPoolSize(self):
|
|
repository = self.g.get_repo(REPO_NAME)
|
|
self.assertIsInstance(repository, github.Repository.Repository)
|
|
self.assertEqual(repository.full_name, REPO_NAME)
|
|
|
|
def testReturnsRepoAfterSettingPoolSizeHttp(self):
|
|
g = github.Github(
|
|
auth=self.login,
|
|
base_url="http://my.enterprise.com",
|
|
pool_size=20,
|
|
)
|
|
repository = g.get_repo(REPO_NAME)
|
|
self.assertIsInstance(repository, github.Repository.Repository)
|
|
self.assertEqual(repository.full_name, REPO_NAME)
|