Statistics
| Branch: | Tag: | Revision:

root / social / tests / backends / test_angel.py @ a0a04c0a

History | View | Annotate | Download (1.1 kB)

1
import json
2

    
3
from social.tests.backends.oauth import OAuth2Test
4

    
5

    
6
class AngelOAuth2Test(OAuth2Test):
7
    backend_path = 'social.backends.angel.AngelOAuth2'
8
    user_data_url = 'https://api.angel.co/1/me/'
9
    access_token_body = json.dumps({
10
        'access_token': 'foobar',
11
        'token_type': 'bearer'
12
    })
13
    user_data_body = json.dumps({
14
        'facebook_url': 'http://www.facebook.com/foobar',
15
        'bio': None,
16
        'name': 'Foo Bar',
17
        'roles': [],
18
        'github_url': None,
19
        'angellist_url': 'https://angel.co/foobar',
20
        'image': 'https://graph.facebook.com/foobar/picture?type=square',
21
        'linkedin_url': None,
22
        'locations': [],
23
        'twitter_url': None,
24
        'what_ive_built': None,
25
        'dribbble_url': None,
26
        'behance_url': None,
27
        'blog_url': None,
28
        'aboutme_url': None,
29
        'follower_count': 0,
30
        'online_bio_url': None,
31
        'id': 101010
32
    })
33
    expected_username = 'foobar'
34

    
35
    def test_login(self):
36
        self.do_login()
37

    
38
    def test_partial_pipeline(self):
39
        self.do_partial_pipeline()