revert flag changes

This commit is contained in:
Andoni A. committed 2025-08-01 16:07:16 +02:00
1 parent b1cfc2af7e
commit 8cd83f9ea1
5 files changed
+19 -21

No files matched your search

@@ -37,7 +37,7 @@ class TestGitHubProvider:
personal_access_token = PAT_TOKEN
oauth_app_token = None
github_app_id = None
github_app_key_content = None
github_app_key_path = None
fixer_config = load_and_validate_config_file(
"github", default_fixer_config_file_path
)
@@ -60,7 +60,7 @@ class TestGitHubProvider:
personal_access_token,
oauth_app_token,
github_app_id,
github_app_key_content,
github_app_key_path,
)
assert provider._type == "github"
@@ -79,7 +79,7 @@ class TestGitHubProvider:
personal_access_token = None
oauth_app_token = OAUTH_TOKEN
github_app_id = None
github_app_key_content = None
github_app_key_path = None
fixer_config = load_and_validate_config_file(
"github", default_fixer_config_file_path
)
@@ -102,7 +102,7 @@ class TestGitHubProvider:
personal_access_token,
oauth_app_token,
github_app_id,
github_app_key_content,
github_app_key_path,
)
assert provider._type == "github"
@@ -121,7 +121,7 @@ class TestGitHubProvider:
personal_access_token = None
oauth_app_token = None
github_app_id = APP_ID
github_app_key_content = APP_KEY
github_app_key_path = APP_KEY
fixer_config = load_and_validate_config_file(
"github", default_fixer_config_file_path
)
@@ -142,7 +142,7 @@ class TestGitHubProvider:
personal_access_token,
oauth_app_token,
github_app_id,
github_app_key_content,
github_app_key_path,
)
assert provider._type == "github"
@@ -210,7 +210,7 @@ class TestGitHubProvider:
),
):
connection = GithubProvider.test_connection(
github_app_id=APP_ID, github_app_key_content=APP_KEY
github_app_id=APP_ID, github_app_key_path=APP_KEY
)
assert isinstance(connection, Connection)
@@ -272,7 +272,7 @@ class TestGitHubProvider:
):
with pytest.raises(GithubInvalidCredentialsError):
GithubProvider.test_connection(
github_app_id=APP_ID, github_app_key_content="invalid-key"
github_app_id=APP_ID, github_app_key_path="invalid-key"
)
def test_test_connection_with_invalid_app_credentials_no_raise(self):
@@ -291,7 +291,7 @@ class TestGitHubProvider:
):
connection = GithubProvider.test_connection(
github_app_id=APP_ID,
github_app_key_content="invalid-key",
github_app_key_path="invalid-key",
raise_on_exception=False,
)
@@ -61,11 +61,17 @@ class Test_GitHubArguments:
arguments.init_parser(mock_github_args)
# Verify authentication arguments were added
assert self.mock_auth_group.add_argument.call_count == 5
assert self.mock_auth_group.add_argument.call_count == 4
# Check that all authentication arguments are present
calls = self.mock_auth_group.add_argument.call_args_list
auth_args = [call[0][0] for call in calls]
auth_args = []
for call in calls:
# Handle both single arguments and aliases
if len(call[0]) > 1:
auth_args.extend(call[0])
else:
auth_args.append(call[0][0])
assert "--personal-access-token" in auth_args
assert "--oauth-app-token" in auth_args