[Python-modules-commits] [python-social-auth] 32/322: Added zotero test, work in progress

Wolfgang Borgert debacle at moszumanska.debian.org
Sat Dec 24 15:12:45 UTC 2016


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

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

commit cb2792cd043f1f4922d85ec72cb2de5532dc1cea
Author: Miguel Paolino <miguel.paolino at datakin.io>
Date:   Fri Nov 7 18:09:00 2014 -0200

    Added zotero test, work in progress
---
 social/tests/backends/test_zotero.py | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/social/tests/backends/test_zotero.py b/social/tests/backends/test_zotero.py
new file mode 100644
index 0000000..d9b837d
--- /dev/null
+++ b/social/tests/backends/test_zotero.py
@@ -0,0 +1,28 @@
+import json
+
+from social.p3 import urlencode
+from social.tests.backends.oauth import OAuth1Test
+
+
+class ZoteroOAuth1Test(OAuth1Test):
+    backend_path = 'social.backends.zotero.ZoteroOAuth'
+    expected_username = 'FooBar'
+
+
+    access_token_body = json.dumps({
+        'access_token': {u'oauth_token': u'foobar',
+                         u'oauth_token_secret': u'rodgsNDK4hLJU1504Atk131G',
+                         u'userID': u'123456_abcdef',
+                         u'username': u'anyusername'}})
+
+    request_token_body = urlencode({
+        'oauth_token_secret': 'foobar-secret',
+        'oauth_token': 'foobar',
+        'oauth_callback_confirmed': 'true'
+    })
+
+    def test_login(self):
+        self.do_login()
+
+    def test_partial_pipeline(self):
+        self.do_partial_pipeline()

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