@@ -445,7 +445,7 @@ def test_verify_uri_noregistered(self):
445445 _ec = self .endpoint .endpoint_context
446446 request = {"redirect_uri" : "https://rp.example.com/cb" }
447447
448- with pytest .raises (ValueError ):
448+ with pytest .raises (KeyError ):
449449 verify_uri (_ec , request , "redirect_uri" , "client_id" )
450450
451451 def test_verify_uri_unregistered (self ):
@@ -993,11 +993,30 @@ def create_endpoint(self):
993993 'flag' : 'c' ,
994994 "writeback" : True
995995 }
996+ },
997+ "jti_db" : {
998+ "class" : 'oidcendpoint.shelve_db.ShelveDataBase' ,
999+ "kwargs" : {
1000+ "filename" : 'jti' ,
1001+ 'flag' : 'c' ,
1002+ "writeback" : True
1003+ }
1004+ },
1005+ "client_db" : {
1006+ "class" : 'oidcendpoint.shelve_db.ShelveDataBase' ,
1007+ "kwargs" : {
1008+ "filename" : 'client' ,
1009+ 'flag' : 'c' ,
1010+ "writeback" : True
1011+ }
9961012 }
1013+
9971014 }
9981015 endpoint_context = EndpointContext (conf )
9991016 _clients = yaml .safe_load (io .StringIO (client_yaml ))
1000- endpoint_context .cdb = _clients ["oidc_clients" ]
1017+ for c ,v in _clients ["oidc_clients" ].items ():
1018+ endpoint_context .cdb [c ] = v
1019+
10011020 endpoint_context .keyjar .import_jwks (
10021021 endpoint_context .keyjar .export_jwks (True , "" ), conf ["issuer" ]
10031022 )
@@ -1194,7 +1213,7 @@ def test_verify_uri_noregistered(self):
11941213 _ec = self .endpoint .endpoint_context
11951214 request = {"redirect_uri" : "https://rp.example.com/cb" }
11961215
1197- with pytest .raises (ValueError ):
1216+ with pytest .raises (KeyError ):
11981217 verify_uri (_ec , request , "redirect_uri" , "client_id" )
11991218 self ._reset ()
12001219
0 commit comments