'pre_social_login passes if existing provider is the same.
I\'m not sure what the real-world counterpart of this is. Logging
in with a different GitHub account? Needed for branch coverage.'

def test_pre_social_login_same_provider(self):

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