3
from .oauth import OAuth2Test
6
class ChatworkOAuth2Test(OAuth2Test):
7
backend_path = 'social_core.backends.chatwork.ChatworkOAuth2'
8
user_data_url = 'https://api.chatwork.com/v2/me'
9
expected_username = 'hogehoge'
10
access_token_body = json.dumps({
11
'access_token': 'pyopyopyopyopyopyopyopyopyopyo',
12
'token_type': 'Bearer',
13
'expires_in': '1501138041000',
14
'refresh_token': 'pyopyopyopyopyopyo',
15
'scope': 'rooms.all:read_write'
18
user_data_body = json.dumps({
22
'chatwork_id': 'hogehoge',
23
'organization_id': 101,
24
'organization_name': 'Foo foobar',
25
'department': 'Support',
27
'url': 'http://www.example.com',
29
'mail': 'hogehoge@example.com',
30
'tel_organization': '',
36
'avatar_image_url': 'https://www.example.com/hogehoge.jpg',
37
'login_mail': 'hogehoge@example.com'
43
def test_partial_pipeline(self):
44
self.do_partial_pipeline()