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')
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")