'Legacy Persona accounts are detected.
This prompts the "account recovery" workflow, where a user can
request an email with a link that allows login to the existing
Persona-backed account, instead of creating a fresh account.'

def test_matching_accounts(self):

    testemail = 'octo.cat.III@github-inc.com'
    profile_data = self.github_profile_data.copy()
    profile_data['email'] = testemail
    email_data = self.github_email_data[:]
    email_data[0]['email'] = testemail
    self.github_login(profile_data=profile_data, email_data=email_data)
    response = self.client.get(self.signup_url)
    self.assertFalse(response.context['matching_accounts'])
    octocat3 = user(username='octocat3', is_active=True, email=testemail, password='test', save=True)
    social_account = SocialAccount.objects.create(uid=testemail, provider='persona', user=octocat3)
    response = self.client.get(self.signup_url)
    self.assertEqual(list(response.context['matching_accounts']), [social_account])
