Skip to content

Commit cb2792c

Browse files
author
Miguel Paolino
committed
Added zotero test, work in progress
1 parent 53f6e92 commit cb2792c

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import json
2+
3+
from social.p3 import urlencode
4+
from social.tests.backends.oauth import OAuth1Test
5+
6+
7+
class ZoteroOAuth1Test(OAuth1Test):
8+
backend_path = 'social.backends.zotero.ZoteroOAuth'
9+
expected_username = 'FooBar'
10+
11+
12+
access_token_body = json.dumps({
13+
'access_token': {u'oauth_token': u'foobar',
14+
u'oauth_token_secret': u'rodgsNDK4hLJU1504Atk131G',
15+
u'userID': u'123456_abcdef',
16+
u'username': u'anyusername'}})
17+
18+
request_token_body = urlencode({
19+
'oauth_token_secret': 'foobar-secret',
20+
'oauth_token': 'foobar',
21+
'oauth_callback_confirmed': 'true'
22+
})
23+
24+
def test_login(self):
25+
self.do_login()
26+
27+
def test_partial_pipeline(self):
28+
self.do_partial_pipeline()

0 commit comments

Comments
 (0)