This file is indexed.

/usr/lib/python3/dist-packages/social/tests/backends/test_foursquare.py is in python3-social-auth 0.2.13-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
import json

from social.tests.backends.oauth import OAuth2Test


class FoursquareOAuth2Test(OAuth2Test):
    backend_path = 'social.backends.foursquare.FoursquareOAuth2'
    user_data_url = 'https://api.foursquare.com/v2/users/self'
    expected_username = 'FooBar'
    access_token_body = json.dumps({
        'access_token': 'foobar',
        'token_type': 'bearer'
    })
    user_data_body = json.dumps({
        'notifications': [{
            'item': {
                'unreadCount': 0
            },
            'type': 'notificationTray'
        }],
        'meta': {
            'errorType': 'deprecated',
            'code': 200,
            'errorDetail': 'Please provide an API version to avoid future '
                           'errors.See http://bit.ly/vywCav'
        },
        'response': {
            'user': {
                'photo': 'https://is0.4sqi.net/userpix_thumbs/'
                         'BYKIT01VN4T4BISN.jpg',
                'pings': False,
                'homeCity': 'Foo, Bar',
                'id': '1010101',
                'badges': {
                    'count': 0,
                    'items': []
                },
                'friends': {
                    'count': 1,
                    'groups': [{
                        'count': 0,
                        'items': [],
                        'type': 'friends',
                        'name': 'Mutual friends'
                    }, {
                        'count': 1,
                        'items': [{
                            'bio': '',
                            'gender': 'male',
                            'firstName': 'Baz',
                            'relationship': 'friend',
                            'photo': 'https://is0.4sqi.net/userpix_thumbs/'
                                     'BYKIT01VN4T4BISN.jpg',
                            'lists': {
                                'groups': [{
                                    'count': 1,
                                    'items': [],
                                    'type': 'created'
                                }]
                            },
                            'homeCity': 'Baz, Qux',
                            'lastName': 'Qux',
                            'tips': {
                                'count': 0
                            },
                            'id': '10101010'
                        }],
                        'type': 'others',
                        'name': 'Other friends'
                    }]
                },
                'referralId': 'u-1010101',
                'tips': {
                    'count': 0
                },
                'type': 'user',
                'todos': {
                    'count': 0
                },
                'bio': '',
                'relationship': 'self',
                'lists': {
                    'groups': [{
                        'count': 1,
                        'items': [],
                        'type': 'created'
                    }]
                },
                'photos': {
                    'count': 0,
                    'items': []
                },
                'checkinPings': 'off',
                'scores': {
                    'max': 0,
                    'checkinsCount': 0,
                    'goal': 50,
                    'recent': 0
                },
                'checkins': {
                    'count': 0
                },
                'firstName': 'Foo',
                'gender': 'male',
                'contact': {
                    'email': 'foo@bar.com'
                },
                'lastName': 'Bar',
                'following': {
                    'count': 0
                },
                'requests': {
                    'count': 0
                },
                'mayorships': {
                    'count': 0,
                    'items': []
                }
            }
        }
    })

    def test_login(self):
        self.do_login()

    def test_partial_pipeline(self):
        self.do_partial_pipeline()