@@ -60,8 +60,15 @@ def test_grant_password_request_with_token_format_opaque(self):
6060 self .assertEqual ("Bearer access-token" , session .headers .get ("Authorization" ))
6161 requests .post .assert_called_with (
6262 requests .post .return_value .url ,
63- data = dict (grant_type = "password" , username = "somebody" , scope = "" , password = "p@s$w0rd" , token_format = "opaque" ),
64- headers = dict (Accept = "application/json" , Authorization = "Basic Y2Y6" ),
63+ data = dict (
64+ grant_type = "password" ,
65+ username = "somebody" ,
66+ scope = "" ,
67+ password = "p@s$w0rd" ,
68+ token_format = "opaque" ,
69+ client_id = "cf" ,
70+ ),
71+ headers = dict (Accept = "application/json" ),
6572 proxies = dict (http = "" , https = "" ),
6673 verify = True ,
6774 )
@@ -84,8 +91,10 @@ def test_refresh_request_with_token_format_opaque(self):
8491 self .assertEqual ("Bearer access-token" , session .headers .get ("Authorization" ))
8592 requests .post .assert_called_with (
8693 requests .post .return_value .url ,
87- data = dict (grant_type = "refresh_token" , scope = "" , refresh_token = "refresh-token" , token_format = "opaque" ),
88- headers = dict (Accept = "application/json" , Authorization = "Basic Y2Y6" ),
94+ data = dict (
95+ grant_type = "refresh_token" , scope = "" , refresh_token = "refresh-token" , token_format = "opaque" , client_id = "cf"
96+ ),
97+ headers = dict (Accept = "application/json" ),
8998 proxies = dict (http = "" , https = "" ),
9099 verify = True ,
91100 )
@@ -112,8 +121,8 @@ def test_refresh_request_with_token_from_cf_config(self):
112121 self .assertEqual ("Bearer access-token" , session .headers .get ("Authorization" ))
113122 requests .post .assert_called_with (
114123 requests .post .return_value .url ,
115- data = dict (grant_type = "refresh_token" , scope = "" , refresh_token = "refresh-token" ),
116- headers = dict (Accept = "application/json" , Authorization = "Basic Y2Y6" ),
124+ data = dict (grant_type = "refresh_token" , scope = "" , refresh_token = "refresh-token" , client_id = "cf" ),
125+ headers = dict (Accept = "application/json" ),
117126 proxies = proxy ,
118127 verify = True ,
119128 )
@@ -144,8 +153,9 @@ def test_grant_password_request_with_login_hint(self):
144153 scope = "" ,
145154 password = "p@s$w0rd" ,
146155 login_hint = "%7B%22origin%22%3A%22uaa%22%7D" ,
156+ client_id = "cf" ,
147157 ),
148- headers = dict (Accept = "application/json" , Authorization = "Basic Y2Y6" ),
158+ headers = dict (Accept = "application/json" ),
149159 proxies = dict (http = "" , https = "" ),
150160 verify = True ,
151161 )
0 commit comments