Skip to content

Commit

Permalink
Fix test logic for correct assert and tangential miss from existing test
Browse files Browse the repository at this point in the history
  • Loading branch information
jinnatar committed Sep 9, 2024
1 parent 01c22cf commit 49a0fc9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions tests/read_only
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
one
two
three
Empty file added tests/read_only.lock
Empty file.
7 changes: 5 additions & 2 deletions tests/test_06_oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ def test_example_response(self):
[
"issuer",
"authorization_endpoint",
"token_endpoint",
"jwks_uri",
"response_types_supported",
"subject_types_supported",
Expand All @@ -480,6 +481,7 @@ def test_required_parameters(self, required_param):
provider_config = {
"issuer": "https://server.example.com",
"authorization_endpoint": "https://server.example.com/connect/authorize",
"token_endpoint": "https://server.example.com/connect/token",
"jwks_uri": "https://server.example.com/jwks.json",
"response_types_supported": ["code", "code id_token", "id_token", "token id_token"],
"subject_types_supported": ["public", "pairwise"],
Expand Down Expand Up @@ -520,19 +522,20 @@ def test_required_parameters_without_rs256(self):
provider_config = {
"issuer": "https://server.example.com",
"authorization_endpoint": "https://server.example.com/connect/authorize",
"token_endpoint": "https://server.example.com/connect/token",
"jwks_uri": "https://server.example.com/jwks.json",
"response_types_supported": ["code", "code id_token", "id_token", "token id_token"],
"subject_types_supported": ["public", "pairwise"],
"id_token_signing_alg_values_supported": ["none", "ES256", "HS256"],
}

with pytest.raises(MissingRequiredAttribute):
ProviderConfigurationResponse(**provider_config).verify()
assert ProviderConfigurationResponse(**provider_config).verify()

def test_required_parameters_only_none_signing_alg(self):
provider_config = {
"issuer": "https://server.example.com",
"authorization_endpoint": "https://server.example.com/connect/authorize",
"token_endpoint": "https://server.example.com/connect/token",
"jwks_uri": "https://server.example.com/jwks.json",
"response_types_supported": ["code", "code id_token", "id_token", "token id_token"],
"subject_types_supported": ["public", "pairwise"],
Expand Down

0 comments on commit 49a0fc9

Please sign in to comment.