[Python-modules-commits] [python-social-auth] 48/71: fix Travis-CI failed
Wolfgang Borgert
debacle at moszumanska.debian.org
Sat Dec 24 15:14:29 UTC 2016
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to tag v0.2.14
in repository python-social-auth.
commit 2c491c6b7f6fc58a4b9cab42a0eb8e6aa11a9842
Author: SeokJun Hong <hong921122 at gmail.com>
Date: Tue Nov 17 09:14:31 2015 -0500
fix Travis-CI failed
---
social/backends/naver.py | 5 ++---
social/tests/backends/test_naver.py | 15 +++++++++------
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/social/backends/naver.py b/social/backends/naver.py
index df67586..709db94 100644
--- a/social/backends/naver.py
+++ b/social/backends/naver.py
@@ -27,9 +27,8 @@ class NaverOAuth2(BaseOAuth2):
def user_data(self, access_token, *args, **kwargs):
"""Loads user data from service"""
dom = minidom.parseString(self.request(
- 'https://openapi.naver.com/v1/nid/getUserProfile.xml',
- method='POST',
- headers={'Authorization': 'Bearer {0}'.format(access_token)}
+ 'https://openapi.naver.com/v1/nid/getUserProfile.xml',
+ headers={'Authorization': 'Bearer {0}'.format(access_token), 'Content_Type': 'text/xml'}
).text.encode('utf-8').strip())
return {
diff --git a/social/tests/backends/test_naver.py b/social/tests/backends/test_naver.py
index d625046..fcb0a67 100644
--- a/social/tests/backends/test_naver.py
+++ b/social/tests/backends/test_naver.py
@@ -12,22 +12,25 @@ class NaverOAuth2Test(OAuth2Test):
user_data_content_type = 'text/xml'
user_data_body = \
+ '<?xml version="1.0" encoding="UTF-8" ?>' \
'<data>' \
'<result>' \
'<resultcode>00</resultcode>' \
'<message>success</message>' \
'</result>' \
'<response>' \
- '<nickname>naverIDLogin</nickname>' \
- '<name>userName<name>' \
- '<id>123456</id>' \
+ '<email><![CDATA[foobar at naver.com]]></email>' \
+ '<nickname><![CDATA[foobar]]></nickname>' \
+ '<profile_image><![CDATA[http://naver.com/image.url.jpg]]></profile_image>' \
+ '<age><![CDATA[20-29]]></age>' \
'<gender>M</gender>' \
- '<age>40-49</age>' \
- '<birthday>01-01</birthday>' \
- '<profile_image>http://naver.com/image.url.jpg</profile_image>' \
+ '<id><![CDATA[123456]]></id>' \
+ '<name><![CDATA[foobar]]></name>' \
+ '<birthday><![CDATA[12-01]]></birthday>' \
'</response>' \
'</data>'
+
def test_login(self):
self.do_login()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-social-auth.git
More information about the Python-modules-commits
mailing list