aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_auth.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_auth.py b/tests/test_auth.py
new file mode 100644
index 0000000..3b62a2f
--- /dev/null
+++ b/tests/test_auth.py
@@ -0,0 +1,16 @@
1try:
2 from urllib.parse import urlparse, parse_qs
3except ImportError:
4 from urlparse import urlparse, parse_qs
5
6def test_auth_request_url(api):
7 url = api.auth_request_url()
8 parse = urlparse(url)
9 assert parse.path == '/oauth/authorize'
10 query = parse_qs(parse.query)
11 assert query['client_id'][0] == api.client_id
12 assert query['response_type'][0] == 'code'
13 assert query['redirect_uri'][0] == 'urn:ietf:wg:oauth:2.0:oob'
14 assert set(query['scope'][0].split()) == set(('read', 'write', 'follow'))
15
16
Powered by cgit v1.2.3 (git 2.41.0)