@@ -60,15 +60,8 @@ 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 (
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" ),
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" ),
7265 proxies = dict (http = "" , https = "" ),
7366 verify = True ,
7467 )
@@ -91,10 +84,8 @@ def test_refresh_request_with_token_format_opaque(self):
9184 self .assertEqual ("Bearer access-token" , session .headers .get ("Authorization" ))
9285 requests .post .assert_called_with (
9386 requests .post .return_value .url ,
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" ),
87+ data = dict (grant_type = "refresh_token" , scope = "" , refresh_token = "refresh-token" , token_format = "opaque" ),
88+ headers = dict (Accept = "application/json" , Authorization = "Basic Y2Y6" ),
9889 proxies = dict (http = "" , https = "" ),
9990 verify = True ,
10091 )
@@ -121,8 +112,8 @@ def test_refresh_request_with_token_from_cf_config(self):
121112 self .assertEqual ("Bearer access-token" , session .headers .get ("Authorization" ))
122113 requests .post .assert_called_with (
123114 requests .post .return_value .url ,
124- data = dict (grant_type = "refresh_token" , scope = "" , refresh_token = "refresh-token" , client_id = "cf" ),
125- headers = dict (Accept = "application/json" ),
115+ data = dict (grant_type = "refresh_token" , scope = "" , refresh_token = "refresh-token" ),
116+ headers = dict (Accept = "application/json" , Authorization = "Basic Y2Y6" ),
126117 proxies = proxy ,
127118 verify = True ,
128119 )
@@ -153,9 +144,8 @@ def test_grant_password_request_with_login_hint(self):
153144 scope = "" ,
154145 password = "p@s$w0rd" ,
155146 login_hint = "%7B%22origin%22%3A%22uaa%22%7D" ,
156- client_id = "cf" ,
157147 ),
158- headers = dict (Accept = "application/json" ),
148+ headers = dict (Accept = "application/json" , Authorization = "Basic Y2Y6" ),
159149 proxies = dict (http = "" , https = "" ),
160150 verify = True ,
161151 )
0 commit comments