Skip to content

Commit

Permalink
Update to testing code per requested changes
Browse files Browse the repository at this point in the history
Update the mock response for username and also updated comments for okta IDP on test-fence-config
  • Loading branch information
cginmn committed Apr 15, 2021
1 parent b7770bf commit 859d5ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test-fence-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ OPENID_CONNECT:
client_id: ''
client_secret: ''
redirect_url: '{{BASE_URL}}/login/cognito/login/'
# For information on configuring an Okta tenant as an OIDC IdP refer to Okta documentation at:
# https://developer.okta.com/docs/reference/api/oidc/#2-okta-as-the-identity-platform-for-your-app-or-api
okta:
discovery_url: ''
client_id: ''
Expand Down
3 changes: 3 additions & 0 deletions tests/test_audit_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ def test_login_log_login_endpoint(
elif idp == "shib":
headers["persistent_id"] = username
idp_name = "itrust"
elif idp == "okta":
mocked_get_user_id = MagicMock()
get_user_id_value = {"okta": username}
elif idp == "fence":
mocked_fetch_access_token = MagicMock(return_value={"id_token": jwt_string})
patch(
Expand Down

0 comments on commit 859d5ba

Please sign in to comment.