'Test that attributes sent by a SAML provider are stored in the UserSocialAuth table.'

def test_login_records_attributes(self):

    self.test_login()
    record = UserSocialAuth.objects.get(user=self.user, provider=self.PROVIDER_BACKEND, uid__startswith=self.PROVIDER_IDP_SLUG)
    attributes = record.extra_data
    self.assertEqual(attributes.get('urn:oid:1.3.6.1.4.1.5923.1.1.1.9'), ['Member@testshib.org', 'Staff@testshib.org'])
    self.assertEqual(attributes.get('urn:oid:2.5.4.3'), ['Me    Myself    And    I'])
    self.assertEqual(attributes.get('urn:oid:0.9.2342.19200300.100.1.1'), ['myself'])
    self.assertEqual(attributes.get('urn:oid:2.5.4.20'), ['555-5555'])
