Skip to content

Commit

Permalink
refactor: rename variable names for instances of ClaimsProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
angela-tran committed Aug 2, 2024
1 parent e38e52f commit 0fa98ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions benefits/oauth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
TEMPLATE_SYSTEM_ERROR = "oauth/system_error.html"


def _oauth_client_or_error_redirect(request, auth_provider):
def _oauth_client_or_error_redirect(request, claims_provider):
"""Calls `benefits.oauth.client.create_client()`.
If a client is created successfully, return it; Otherwise, return a redirect response to the `oauth:system-error` route.
Expand All @@ -34,12 +34,12 @@ def _oauth_client_or_error_redirect(request, auth_provider):
exception = None

try:
oauth_client = create_client(oauth, auth_provider)
oauth_client = create_client(oauth, claims_provider)
except Exception as ex:
exception = ex

if not oauth_client and not exception:
exception = Exception(f"oauth_client not registered: {auth_provider.client_name}")
exception = Exception(f"oauth_client not registered: {claims_provider.client_name}")

if exception:
analytics.error(request, message=str(exception), operation="init")
Expand Down
4 changes: 2 additions & 2 deletions tests/pytest/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ def model_PemData():

@pytest.fixture
def model_ClaimsProvider():
auth_provider = ClaimsProvider.objects.create(
claims_provider = ClaimsProvider.objects.create(
sign_out_button_template="core/includes/button--sign-out--senior.html",
sign_out_link_template="core/includes/link--sign-out--senior.html",
client_name="Client",
client_id_secret_name="1234",
authority="https://example.com",
)

return auth_provider
return claims_provider


@pytest.fixture
Expand Down

0 comments on commit 0fa98ee

Please sign in to comment.