[Python-modules-commits] [python-social-auth] 61/89: PEP8 and code style
Wolfgang Borgert
debacle at moszumanska.debian.org
Sat Dec 24 15:15:56 UTC 2016
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to tag v0.2.15
in repository python-social-auth.
commit 9440655649cd2c0db558f9d308d17c4d7347ab58
Author: Matías Aguirre <matiasaguirre at gmail.com>
Date: Sun Mar 27 02:52:10 2016 -0300
PEP8 and code style
---
docs/backends/drip.rst | 5 +++--
docs/backends/index.rst | 1 +
social/backends/drip.py | 6 +++---
social/tests/backends/test_drip.py | 18 +++++++++++-------
4 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/docs/backends/drip.rst b/docs/backends/drip.rst
index b09c64e..88f09a2 100644
--- a/docs/backends/drip.rst
+++ b/docs/backends/drip.rst
@@ -1,11 +1,12 @@
Drip
-=========
+====
Drip uses OAuth v2 for Authentication.
- Register a new application with `Drip`_, and
-- fill ``Client ID`` and ``Client Secret`` from getdrip.com values in the settings::
+- fill ``Client ID`` and ``Client Secret`` from getdrip.com values in
+ the settings::
SOCIAL_AUTH_DRIP_KEY = ''
SOCIAL_AUTH_DRIP_SECRET = ''
diff --git a/docs/backends/index.rst b/docs/backends/index.rst
index 8a80099..cf37adc 100644
--- a/docs/backends/index.rst
+++ b/docs/backends/index.rst
@@ -70,6 +70,7 @@ Social backends
docker
douban
dribbble
+ drip
dropbox
eveonline
evernote
diff --git a/social/backends/drip.py b/social/backends/drip.py
index 96ae934..4bfeb95 100644
--- a/social/backends/drip.py
+++ b/social/backends/drip.py
@@ -20,6 +20,6 @@ class DripOAuth(BaseOAuth2):
'username': response['users'][0]['email']}
def user_data(self, access_token, *args, **kwargs):
- return self.get_json(
- 'https://api.getdrip.com/v2/user',
- headers={'Authorization': 'Bearer %s' % access_token})
+ return self.get_json('https://api.getdrip.com/v2/user', headers={
+ 'Authorization': 'Bearer %s' % access_token
+ })
diff --git a/social/tests/backends/test_drip.py b/social/tests/backends/test_drip.py
index e9424ac..20cb620 100644
--- a/social/tests/backends/test_drip.py
+++ b/social/tests/backends/test_drip.py
@@ -8,15 +8,19 @@ class DripOAuthTest(OAuth2Test):
user_data_url = 'https://api.getdrip.com/v2/user'
expected_username = 'other at example.com'
access_token_body = json.dumps({
- "access_token": "822bbf7cd12243df",
- "token_type": "bearer",
- "scope": "public"
+ 'access_token': '822bbf7cd12243df',
+ 'token_type': 'bearer',
+ 'scope': 'public'
})
- user_data_body = json.dumps(
- {'users': [
- {'email': 'other at example.com', 'name': None}
- ]})
+ user_data_body = json.dumps({
+ 'users': [
+ {
+ 'email': 'other at example.com',
+ 'name': None
+ }
+ ]
+ })
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