@@ -36,11 +36,11 @@ def test_update_jwt(self):
3636 with patch ("requests.post" ) as mock_post :
3737 mock_post .return_value .ok = False
3838 self .assertRaises (
39- AuthException , client .mgmt .jwt .update_jwt , "jwt" , {"k1" : "v1" }
39+ AuthException , client .mgmt .jwt .update_jwt , "jwt" , {"k1" : "v1" }, 0
4040 )
4141
4242 self .assertRaises (
43- AuthException , client .mgmt .jwt .update_jwt , "" , {"k1" : "v1" }
43+ AuthException , client .mgmt .jwt .update_jwt , "" , {"k1" : "v1" }, 0
4444 )
4545
4646 # Test success flow
@@ -49,7 +49,7 @@ def test_update_jwt(self):
4949 network_resp .ok = True
5050 network_resp .json .return_value = json .loads ("""{"jwt": "response"}""" )
5151 mock_post .return_value = network_resp
52- resp = client .mgmt .jwt .update_jwt ("test" , {"k1" : "v1" })
52+ resp = client .mgmt .jwt .update_jwt ("test" , {"k1" : "v1" }, 40 )
5353 self .assertEqual (resp , "response" )
5454 expected_uri = f"{ common .DEFAULT_BASE_URL } { MgmtV1 .update_jwt_path } "
5555 mock_post .assert_called_with (
@@ -58,7 +58,11 @@ def test_update_jwt(self):
5858 ** common .default_headers ,
5959 "Authorization" : f"Bearer { self .dummy_project_id } :{ self .dummy_management_key } " ,
6060 },
61- json = {"jwt" : "test" , "customClaims" : {"k1" : "v1" }},
61+ json = {
62+ "jwt" : "test" ,
63+ "customClaims" : {"k1" : "v1" },
64+ "refreshDuration" : 40 ,
65+ },
6266 allow_redirects = False ,
6367 verify = True ,
6468 params = None ,
0 commit comments