~ubuntu-branches/debian/sid/social-auth-core/sid

« back to all changes in this revision

Viewing changes to social_core/tests/backends/test_angel.py

  • Committer: Package Import Robot
  • Author(s): Andre Bianchi
  • Date: 2018-02-22 19:49:12 UTC
  • Revision ID: package-import@ubuntu.com-20180222194912-4lqv8mlhnqc4ncd3
Tags: upstream-1.7.0
ImportĀ upstreamĀ versionĀ 1.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import json
 
2
 
 
3
from .oauth import OAuth2Test
 
4
 
 
5
 
 
6
class AngelOAuth2Test(OAuth2Test):
 
7
    backend_path = 'social_core.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()