(self, authMode, retry=None, pool_size=None)
| 609 | self.g = self.get_github(self.authMode, self.retry, self.pool_size) |
| 610 | |
| 611 | def get_github(self, authMode, retry=None, pool_size=None): |
| 612 | if authMode == "token": |
| 613 | auth = self.oauth_token |
| 614 | elif authMode == "jwt": |
| 615 | auth = self.jwt |
| 616 | elif authMode == "app": |
| 617 | auth = self.app_auth |
| 618 | elif self.authMode == "none": |
| 619 | auth = None |
| 620 | else: |
| 621 | raise ValueError(f"Unsupported test auth mode: {authMode}") |
| 622 | |
| 623 | return github.Github( |
| 624 | auth=auth, |
| 625 | per_page=self.per_page, |
| 626 | retry=retry, |
| 627 | pool_size=pool_size, |
| 628 | seconds_between_requests=self.seconds_between_requests, |
| 629 | seconds_between_writes=self.seconds_between_writes, |
| 630 | ) |
| 631 | |
| 632 | |
| 633 | def activateRecordMode(): # pragma no cover (Function useful only when recording new tests, not used during automated tests) |
no outgoing calls
no test coverage detected