summaryrefslogtreecommitdiff
path: root/tests/oauth2/rfc6749/clients/test_web_application.py
diff options
context:
space:
mode:
authorJonathan Huot <JonathanHuot@users.noreply.github.com>2019-08-30 11:58:01 +0200
committerGitHub <noreply@github.com>2019-08-30 11:58:01 +0200
commit27151752e0ba82bb07042b4a9bd5cd2b4482c126 (patch)
treeeb4841bca518728e5fcd6d3a5476db8ba578046c /tests/oauth2/rfc6749/clients/test_web_application.py
parent114dab8b5c6f34fa2936e22e0b33c27aa65096d2 (diff)
parentca57b0bcae835493d9db8f9bf1f1228b71b8e3f8 (diff)
downloadoauthlib-27151752e0ba82bb07042b4a9bd5cd2b4482c126.tar.gz
Merge branch 'master' into doc-improvement
Diffstat (limited to 'tests/oauth2/rfc6749/clients/test_web_application.py')
-rw-r--r--tests/oauth2/rfc6749/clients/test_web_application.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/tests/oauth2/rfc6749/clients/test_web_application.py b/tests/oauth2/rfc6749/clients/test_web_application.py
index 092f93e..e3382c8 100644
--- a/tests/oauth2/rfc6749/clients/test_web_application.py
+++ b/tests/oauth2/rfc6749/clients/test_web_application.py
@@ -1,7 +1,4 @@
# -*- coding: utf-8 -*-
-from __future__ import absolute_import, unicode_literals
-
-import datetime
import os
import warnings
@@ -13,14 +10,10 @@ from oauthlib.oauth2 import (BackendApplicationClient, Client,
WebApplicationClient)
from oauthlib.oauth2.rfc6749 import errors, utils
from oauthlib.oauth2.rfc6749.clients import AUTH_HEADER, BODY, URI_QUERY
+import urllib.parse as urlparse
from ....unittest import TestCase
-# this is the same import method used in oauthlib/oauth2/rfc6749/parameters.py
-try:
- import urlparse
-except ImportError:
- import urllib.parse as urlparse
@patch('time.time', new=lambda: 1000)
@@ -46,7 +39,7 @@ class WebApplicationClientTest(TestCase):
code = "zzzzaaaa"
body = "not=empty"
- body_code = "not=empty&grant_type=authorization_code&code=%s&client_id=%s" % (code, client_id)
+ body_code = "not=empty&grant_type=authorization_code&code={}&client_id={}".format(code, client_id)
body_redirect = body_code + "&redirect_uri=http%3A%2F%2Fmy.page.com%2Fcallback"
body_kwargs = body_code + "&some=providers&require=extra+arguments"