Fix mypy arg-type error in Google secondary-auth test helper

PSAAuthnz expects app_config: GalaxyAppConfiguration, so passing a
SimpleNamespace directly fails mypy. Assign it onto a MagicMock attribute
(typed Any) instead, matching the existing make_psa_authnz helper.
This commit is contained in:
Nuwan Goonasekera
2026-06-26 11:12:16 +05:30
parent 4a213421bb
commit ab32e80688
+7 -5
View File
@@ -678,6 +678,12 @@ def make_google_secondary_auth_psa_authnz(extra_scopes=None):
}
if extra_scopes is not None:
oidc_backend_config["extra_scopes"] = extra_scopes
mock_app = MagicMock()
mock_app.config = SimpleNamespace(
oidc_auth_pipeline=None,
oidc_auth_pipeline_extra=None,
fixed_delegated_auth=False,
)
return PSAAuthnz(
provider="google",
oidc_config={
@@ -685,11 +691,7 @@ def make_google_secondary_auth_psa_authnz(extra_scopes=None):
"SECONDARY_AUTH_ENDPOINT": "https://secondary.example.com/auth",
},
oidc_backend_config=oidc_backend_config,
app_config=SimpleNamespace(
oidc_auth_pipeline=None,
oidc_auth_pipeline_extra=None,
fixed_delegated_auth=False,
),
app_config=mock_app.config,
)