Files
PyGithub/tests/PoolSize.py
T
Enrico Minack fc2d0e150a Add authentication classes, move auth logic there (#2528)
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`.
2023-06-08 09:17:25 +02:00

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)