Skip to content

Commit 7170edc

Browse files
committed
fix some tests
1 parent a598490 commit 7170edc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/test_server_24_oauth2_authorization_endpoint.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def test_verify_uri_noregistered(self):
348348
_context = self.endpoint.upstream_get("context")
349349
request = {"redirect_uri": "https://rp.example.com/cb"}
350350

351-
with pytest.raises(KeyError):
351+
with pytest.raises(UnknownClient):
352352
verify_uri(_context, request, "redirect_uri", "client_id")
353353

354354
def test_verify_uri_unregistered(self):
@@ -553,7 +553,7 @@ def test_verify_uri_wrong_uri_type(self):
553553
_context.cdb["client_id"] = {"redirect_uris": [("https://rp.example.com/cb", {})]}
554554

555555
request = {"redirect_uri": "https://rp.example.com/cb?foo=bob"}
556-
with pytest.raises(ValueError):
556+
with pytest.raises(URIError):
557557
verify_uri(_context, request, "post_logout_redirect_uri", "client_id")
558558

559559
def test_verify_uri_none_registered(self):

tests/test_server_24_oidc_authorization_endpoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ def test_verify_uri_noregistered(self):
447447
_ec = self.endpoint.upstream_get("context")
448448
request = {"redirect_uri": "https://rp.example.com/cb"}
449449

450-
with pytest.raises(KeyError):
450+
with pytest.raises(UnknownClient):
451451
verify_uri(_ec, request, "redirect_uri", "client_id")
452452

453453
def test_verify_uri_unregistered(self):

0 commit comments

Comments
 (0)