@@ -480,7 +480,7 @@ def test_httpc_params_1():
480
480
rsps .add (method = responses .GET , url = source , json = JWKS_DICT , status = 200 )
481
481
httpc_params = {"timeout" : (2 , 2 )} # connect, read timeouts in seconds
482
482
kb = KeyBundle (source = source , httpc = requests .request , httpc_params = httpc_params )
483
- assert kb .do_remote ()
483
+ assert kb ._do_remote ()
484
484
485
485
486
486
@pytest .mark .network
@@ -926,7 +926,7 @@ def test_remote():
926
926
rsps .add (method = "GET" , url = source , json = JWKS_DICT , status = 200 )
927
927
httpc_params = {"timeout" : (2 , 2 )} # connect, read timeouts in seconds
928
928
kb = KeyBundle (source = source , httpc = requests .request , httpc_params = httpc_params )
929
- kb .do_remote ()
929
+ kb ._do_remote ()
930
930
931
931
exp = kb .dump ()
932
932
kb2 = KeyBundle ().load (exp )
@@ -954,13 +954,13 @@ def test_remote_not_modified():
954
954
955
955
with responses .RequestsMock () as rsps :
956
956
rsps .add (method = "GET" , url = source , json = JWKS_DICT , status = 200 , headers = headers )
957
- assert kb .do_remote ()
957
+ assert kb ._do_remote ()
958
958
assert kb .last_remote == headers .get ("Last-Modified" )
959
959
timeout1 = kb .time_out
960
960
961
961
with responses .RequestsMock () as rsps :
962
962
rsps .add (method = "GET" , url = source , status = 304 , headers = headers )
963
- assert not kb .do_remote ()
963
+ assert not kb ._do_remote ()
964
964
assert kb .last_remote == headers .get ("Last-Modified" )
965
965
timeout2 = kb .time_out
966
966
@@ -994,19 +994,19 @@ def test_ignore_errors_period():
994
994
httpc_params = httpc_params ,
995
995
ignore_errors_period = ignore_errors_period ,
996
996
)
997
- res = kb .do_remote ()
997
+ res = kb ._do_remote ()
998
998
assert res == True
999
999
assert kb .ignore_errors_until is None
1000
1000
1001
1001
# refetch, but fail by using a bad source
1002
1002
kb .source = source_bad
1003
1003
try :
1004
- res = kb .do_remote ()
1004
+ res = kb ._do_remote ()
1005
1005
except UpdateFailed :
1006
1006
pass
1007
1007
1008
1008
# retry should fail silently as we're in holddown
1009
- res = kb .do_remote ()
1009
+ res = kb ._do_remote ()
1010
1010
assert kb .ignore_errors_until is not None
1011
1011
assert res == False
1012
1012
@@ -1015,7 +1015,7 @@ def test_ignore_errors_period():
1015
1015
1016
1016
# try again
1017
1017
kb .source = source_good
1018
- res = kb .do_remote ()
1018
+ res = kb ._do_remote ()
1019
1019
assert res == True
1020
1020
1021
1021
@@ -1037,7 +1037,7 @@ def test_exclude_attributes():
1037
1037
rsps .add (method = "GET" , url = source , json = JWKS_DICT , status = 200 )
1038
1038
httpc_params = {"timeout" : (2 , 2 )} # connect, read timeouts in seconds
1039
1039
kb = KeyBundle (source = source , httpc = requests .request , httpc_params = httpc_params )
1040
- kb .do_remote ()
1040
+ kb ._do_remote ()
1041
1041
1042
1042
exp = kb .dump (exclude_attributes = ["cache_time" , "ignore_invalid_keys" ])
1043
1043
kb2 = KeyBundle (cache_time = 600 , ignore_invalid_keys = False ).load (exp )
@@ -1052,7 +1052,7 @@ def test_remote_dump_json():
1052
1052
rsps .add (method = "GET" , url = source , json = JWKS_DICT , status = 200 )
1053
1053
httpc_params = {"timeout" : (2 , 2 )} # connect, read timeouts in seconds
1054
1054
kb = KeyBundle (source = source , httpc = requests .request , httpc_params = httpc_params )
1055
- kb .do_remote ()
1055
+ kb ._do_remote ()
1056
1056
1057
1057
exp = kb .dump ()
1058
1058
assert json .dumps (exp )
0 commit comments