diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2014-09-22 13:58:13 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2014-09-22 13:58:13 -0500 |
commit | a6252cbf211691aa9d81fd535f5af7bcdbbd6620 (patch) | |
tree | ca1131ba7a8ff0437d392c20a70f17ee7470e3dd /mediagoblin/tests/test_http_callback.py | |
parent | c47f402d7ee42e88ee1086351010dd598da6c0a5 (diff) | |
parent | 6430ae97eca57f4db4bcef54436df6c2abcd21ad (diff) | |
download | mediagoblin-a6252cbf211691aa9d81fd535f5af7bcdbbd6620.tar.lz mediagoblin-a6252cbf211691aa9d81fd535f5af7bcdbbd6620.tar.xz mediagoblin-a6252cbf211691aa9d81fd535f5af7bcdbbd6620.zip |
Merge branch 'merge-python3-port'
Conflicts:
setup.py
Diffstat (limited to 'mediagoblin/tests/test_http_callback.py')
-rw-r--r-- | mediagoblin/tests/test_http_callback.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mediagoblin/tests/test_http_callback.py b/mediagoblin/tests/test_http_callback.py index 64b7ee8f..38f1cfaf 100644 --- a/mediagoblin/tests/test_http_callback.py +++ b/mediagoblin/tests/test_http_callback.py @@ -17,7 +17,9 @@ import json import pytest -from urlparse import urlparse, parse_qs +import six + +from six.moves.urllib.parse import parse_qs, urlparse from mediagoblin import mg_globals from mediagoblin.tools import processing @@ -49,7 +51,7 @@ class TestHTTPCallback(object): 'client_id': client_id, 'client_secret': client_secret}) - response_data = json.loads(response.body) + response_data = json.loads(response.body.decode()) return response_data['access_token'] @@ -63,7 +65,7 @@ class TestHTTPCallback(object): code = parse_qs(urlparse(redirect.location).query)['code'][0] client = self.db.OAuthClient.query.filter( - self.db.OAuthClient.identifier == unicode(client_id)).first() + self.db.OAuthClient.identifier == six.text_type(client_id)).first() client_secret = client.secret |