@@ -36,11 +36,11 @@ def test_update_jwt(self):
36
36
with patch ("requests.post" ) as mock_post :
37
37
mock_post .return_value .ok = False
38
38
self .assertRaises (
39
- AuthException , client .mgmt .jwt .update_jwt , "jwt" , {"k1" : "v1" }
39
+ AuthException , client .mgmt .jwt .update_jwt , "jwt" , {"k1" : "v1" }, 0
40
40
)
41
41
42
42
self .assertRaises (
43
- AuthException , client .mgmt .jwt .update_jwt , "" , {"k1" : "v1" }
43
+ AuthException , client .mgmt .jwt .update_jwt , "" , {"k1" : "v1" }, 0
44
44
)
45
45
46
46
# Test success flow
@@ -49,7 +49,7 @@ def test_update_jwt(self):
49
49
network_resp .ok = True
50
50
network_resp .json .return_value = json .loads ("""{"jwt": "response"}""" )
51
51
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 )
53
53
self .assertEqual (resp , "response" )
54
54
expected_uri = f"{ common .DEFAULT_BASE_URL } { MgmtV1 .update_jwt_path } "
55
55
mock_post .assert_called_with (
@@ -58,7 +58,11 @@ def test_update_jwt(self):
58
58
** common .default_headers ,
59
59
"Authorization" : f"Bearer { self .dummy_project_id } :{ self .dummy_management_key } " ,
60
60
},
61
- json = {"jwt" : "test" , "customClaims" : {"k1" : "v1" }},
61
+ json = {
62
+ "jwt" : "test" ,
63
+ "customClaims" : {"k1" : "v1" },
64
+ "refreshDuration" : 40 ,
65
+ },
62
66
allow_redirects = False ,
63
67
verify = True ,
64
68
params = None ,
0 commit comments