'When we detected a legacy Persona account, advise recovery of account.
A user tries to sign in with GitHub, but their GitHub email matches
an existing MDN account backed by Persona. They are prompted to
recover the existing account.
https://bugzil.la/1063830, happy path'

def test_pre_social_login_matched_login(self):

    github_account = SocialAccount.objects.get(user__username='testuser2')
    github_login = SocialLogin(account=github_account, user=github_account.user)
    SocialAccount.objects.create(user=github_account.user, provider='persona', uid=github_account.user.email)
    request = self.rf.get('/')
    session = self.client.session
    session['sociallogin_provider'] = 'github'
    session['socialaccount_sociallogin'] = github_login.serialize()
    session.save()
    request.session = session
    self.adapter.pre_social_login(request, github_login)
    session = request.session
    eq_(session['sociallogin_provider'], 'github')
