'Test that trying to get a database-backed UserSocialAuth from an existing
instance returns correctly.'

def test_get_real_social_auth(self):

    request = mock.MagicMock()
    pipeline_partial = {'kwargs': {'social': self.social_auth}}
    with mock.patch('third_party_auth.pipeline.get') as get_pipeline:
        get_pipeline.return_value = pipeline_partial
        real_social = pipeline.get_real_social_auth_object(request)
        self.assertEqual(real_social, self.social_auth)
