Ejemplo n.º 1
0
 def test_data_to_str(self):
     data = {
         'emailAddress': '*****@*****.**',
         'firstName': 'John',
         'id': 'a1b2c3d4e',
         'lastName': 'Doe',
         'pictureUrl': 'https://media.licdn.com/mpr/foo',
         'pictureUrls': {'_total': 1,
                         'values': ['https://media.licdn.com/foo']},
         'publicProfileUrl': 'https://www.linkedin.com/in/johndoe'}
     acc = SocialAccount(extra_data=data, provider='linkedin_oauth2')
     self.assertEqual(acc.get_provider_account().to_str(), 'John Doe')
Ejemplo n.º 2
0
 def test_data_to_str(self):
     data = {
         "emailAddress": "*****@*****.**",
         "firstName": "John",
         "id": "a1b2c3d4e",
         "lastName": "Doe",
         "pictureUrl": "https://media.licdn.com/mpr/foo",
         "pictureUrls": {
             "_total": 1,
             "values": ["https://media.licdn.com/foo"],
         },
         "publicProfileUrl": "https://www.linkedin.com/in/johndoe",
     }
     acc = SocialAccount(extra_data=data, provider="linkedin_oauth2")
     self.assertEqual(acc.get_provider_account().to_str(), "John Doe")