File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1
1
import json
2
2
import os
3
+ import warnings
3
4
import shutil
4
5
import time
5
6
@@ -445,11 +446,16 @@ def test_no_use(self):
445
446
@pytest .mark .network
446
447
def test_provider (self ):
447
448
kj = KeyJar ()
449
+ _url = "https://connect-op.herokuapp.com/jwks.json"
448
450
kj .load_keys (
449
- "https://connect-op.heroku.com" , jwks_uri = "https://connect-op.herokuapp.com/jwks.json" ,
451
+ "https://connect-op.heroku.com" , jwks_uri = _url ,
450
452
)
451
-
452
- assert kj .get_issuer_keys ("https://connect-op.heroku.com" )[0 ].keys ()
453
+ iss_keys = kj .get_issuer_keys ("https://connect-op.heroku.com" )
454
+ if not iss_keys :
455
+ _msg = '{} is not available at this moment!' .format (_url )
456
+ warnings .warn (_msg )
457
+ else :
458
+ assert iss_kes [0 ].keys ()
453
459
454
460
455
461
def test_import_jwks ():
You can’t perform that action at this time.
0 commit comments