We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0adb58e commit a1ed2deCopy full SHA for a1ed2de
tests/test_oauth2_session.py
@@ -132,8 +132,12 @@ def token_updater(token):
132
def fake_refresh_with_auth(r, **kwargs):
133
if "/refresh" in r.url:
134
self.assertIn("Authorization", r.headers)
135
- encoded = b64encode(b"%s:%s" % (self.client_id, self.client_secret))
136
- content = (b"Basic " + encoded).decode('latin1')
+ encoded = b64encode(
+ "{client_id}:{client_secret}"
137
+ .format(client_id=self.client_id, client_secret=self.client_secret)
138
+ .encode('latin1')
139
+ )
140
+ content = "Basic {encoded}".format(encoded=encoded.decode('latin1'))
141
self.assertEqual(r.headers["Authorization"], content)
142
resp = mock.MagicMock()
143
resp.text = json.dumps(self.token)
0 commit comments