feat: pat and oauth authentication with and without flags

This commit is contained in:
HugoPBrito committed 2024-11-25 17:00:33 +01:00
1 parent b94a535aba
commit aa0d82f500
5 files changed
+99 -42

No files matched your search

+1 -1
View File
@@ -14,7 +14,7 @@ TOKEN = "github-token"
# Mocked GitHub Provider
def set_mocked_github_provider(
auth_method: str = "personal_access_token",
auth_method: str = "personal_access",
credentials: GithubSession = GithubSession(token=TOKEN),
identity: GithubIdentityInfo = GithubIdentityInfo(
account_name=ACCOUNT_NAME,
@@ -17,7 +17,7 @@ from tests.providers.github.github_fixtures import (
class TestGitHubProvider:
def test_github_provider(self):
# We need to set exactly one auth method
personal_access_token = True
personal_access = True
oauth_app = False
github_app = False
fixer_config = load_and_validate_config_file(
@@ -36,7 +36,7 @@ class TestGitHubProvider:
),
):
provider = GithubProvider(
personal_access_token,
personal_access,
github_app,
oauth_app,
)