summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormyyang <ymy1019@gmail.com>2015-07-02 10:50:00 +0800
committermyyang <ymy1019@gmail.com>2015-07-02 10:50:00 +0800
commitf2402efa2a29631a3f67df9157fdf9d746861406 (patch)
tree85172259211dd255683336fd1eb0ca58e620d50e
parentde586cd17cce1363ee611fea30a47aee908f861b (diff)
downloadoauthlib-f2402efa2a29631a3f67df9157fdf9d746861406.tar.gz
Fix string format compatibility
-rw-r--r--tests/oauth2/rfc6749/clients/test_base.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/oauth2/rfc6749/clients/test_base.py b/tests/oauth2/rfc6749/clients/test_base.py
index b60c6a8..fd85d7b 100644
--- a/tests/oauth2/rfc6749/clients/test_base.py
+++ b/tests/oauth2/rfc6749/clients/test_base.py
@@ -217,7 +217,7 @@ class ClientTest(TestCase):
u, h, b = client.prepare_refresh_token_request(url, token)
self.assertEqual(u, url)
self.assertEqual(h, {'Content-Type': 'application/x-www-form-urlencoded'})
- self.assertEqual(b, 'grant_type=refresh_token&refresh_token={}'.format(token))
+ self.assertURLEqual(b, 'grant_type=refresh_token&refresh_token=%s' % token)
# Non-HTTPS revocation endpoint
self.assertRaises(InsecureTransportError,
@@ -228,11 +228,11 @@ class ClientTest(TestCase):
u, h, b = client.prepare_refresh_token_request(url, token, scope=scope)
self.assertEqual(u, url)
self.assertEqual(h, {'Content-Type': 'application/x-www-form-urlencoded'})
- self.assertEqual(b, 'grant_type=refresh_token&scope={}&refresh_token={}'.format(scope, token))
+ self.assertURLEqual(b, 'grant_type=refresh_token&scope=%s&refresh_token=%s' % (scope, token))
# provide scope while init
client = Client(self.client_id, scope=scope)
u, h, b = client.prepare_refresh_token_request(url, token, scope=scope)
self.assertEqual(u, url)
self.assertEqual(h, {'Content-Type': 'application/x-www-form-urlencoded'})
- self.assertEqual(b, 'grant_type=refresh_token&scope={}&refresh_token={}'.format(scope, token))
+ self.assertURLEqual(b, 'grant_type=refresh_token&scope=%s&refresh_token=%s' % (scope, token))