[Python-modules-commits] [python-social-auth] 14/61: Fix test failed: get right user_id from response

Wolfgang Borgert debacle at moszumanska.debian.org
Sat Dec 24 15:14:02 UTC 2016


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to tag v0.2.13
in repository python-social-auth.

commit 5af636119211eca9071121d9a4460b832ef48808
Author: Lee Jaeyoung <jaeyoung at monodiary.net>
Date:   Thu Jul 16 12:23:07 2015 +0900

    Fix test failed:
    get right user_id from response
---
 social/backends/orbi.py            | 2 +-
 social/tests/backends/test_orbi.py | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/social/backends/orbi.py b/social/backends/orbi.py
index 177d6fe..113cb48 100644
--- a/social/backends/orbi.py
+++ b/social/backends/orbi.py
@@ -19,7 +19,7 @@ class OrbiOAuth2(BaseOAuth2):
     ]
 
     def get_user_id(self, details, response):
-        return response
+        return response.get('id')
 
     def get_user_details(self, response):
         fullname, first_name, last_name = self.get_user_names(response.get('name', ''),
diff --git a/social/tests/backends/test_orbi.py b/social/tests/backends/test_orbi.py
index a35a1d5..7702459 100644
--- a/social/tests/backends/test_orbi.py
+++ b/social/tests/backends/test_orbi.py
@@ -6,6 +6,7 @@ from social.tests.backends.oauth import OAuth2Test
 class OrbiOAuth2Test(OAuth2Test):
     backend_path = 'social.backends.orbi.OrbiOAuth2'
     user_data_url = 'https://login.orbi.kr/oauth/user/get'
+    expected_username = 'foobar'
     access_token_body = json.dumps({
         'access_token': 'foobar',
     })
@@ -19,8 +20,7 @@ class OrbiOAuth2Test(OAuth2Test):
         'nick': 'foobar',
         'photo': 'http://s3.orbi.kr/data/member/wi/wizetdev_132894975780.jpeg',
         'sex': 'M',
-        'birth': '1973-08-03'
-
+        'birth': '1973-08-03',
     })
 
     def test_login(self):

-- 
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