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

« back to all changes in this revision

Viewing changes to social_core/tests/backends/test_sketchfab.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 SketchfabOAuth2Test(OAuth2Test):
 
7
    backend_path = 'social_core.backends.sketchfab.SketchfabOAuth2'
 
8
    user_data_url = 'https://sketchfab.com/v2/users/me'
 
9
    expected_username = 'foobar'
 
10
    access_token_body = json.dumps({
 
11
        'access_token': 'foobar',
 
12
        'token_type': 'bearer'
 
13
    })
 
14
    user_data_body = json.dumps({
 
15
        'uid': '42',
 
16
        'email': 'foo@bar.com',
 
17
        'displayName': 'foo bar',
 
18
        'username': 'foobar',
 
19
        'apiToken': 'XXX'
 
20
    })
 
21
 
 
22
    def test_login(self):
 
23
        self.do_login()
 
24
 
 
25
    def test_partial_pipeline(self):
 
26
        self.do_partial_pipeline()