@@ -462,12 +462,14 @@ def test_load_extern_incommon(mock_request):
462
462
463
463
sec_config .xmlsec_binary = sigver .get_xmlsec_binary (["/opt/local/bin" ])
464
464
mds = MetadataStore (ATTRCONV , sec_config ,
465
- disable_ssl_certificate_validation = True )
465
+ disable_ssl_certificate_validation = True ,
466
+ timeout = 10 )
466
467
467
468
mds .imp (METADATACONF ["10" ])
468
469
print (mds )
469
470
assert mds
470
471
assert len (mds .keys ())
472
+ mock_request .assert_called_with ('GET' , 'http://md.incommon.org/InCommon/InCommon-metadata-export.xml' , allow_redirects = False , verify = False , timeout = 10 )
471
473
472
474
473
475
def test_load_local ():
@@ -495,10 +497,13 @@ def test_load_remote_encoding(mock_request):
495
497
496
498
crypto = sigver ._get_xmlsec_cryptobackend ()
497
499
sc = sigver .SecurityContext (crypto , key_type = "" , cert_type = "" )
498
- httpc = HTTPBase ()
499
- mds = MetaDataExtern (ATTRCONV , 'http://metadata.aai.switch.ch/metadata.aaitest.xml' , sc , full_path ('SWITCHaaiRootCA.crt.pem' ), httpc )
500
+ url = 'http://metadata.aai.switch.ch/metadata.aaitest.xml'
501
+ httpc = HTTPBase (timeout = 10 )
502
+ mds = MetaDataExtern (ATTRCONV , url , sc , full_path ('SWITCHaaiRootCA.crt.pem' ), httpc )
500
503
mds .load ()
501
504
505
+ mock_request .assert_called_with ('GET' , url , allow_redirects = False , verify = True , timeout = 10 )
506
+
502
507
503
508
def test_load_string ():
504
509
sec_config .xmlsec_binary = sigver .get_xmlsec_binary (["/opt/local/bin" ])
0 commit comments