def test_reactivation_email_sent_to_user(self):
        request = self.factory.get('/')
        invite_user_to_reactivate_account(self.closed_user, request)

        expected_subject = 'Reactivate your {} account'.format(self.site.name)
        expected_intro = 'Hi {},'.format(self.closed_user.full_name)
        expected_content = '{} using this email address.'.format(
            self.site.name)
        expected_url = 'http://testserver/accounts/activate/{}'.format(
            self.closed_user.auth_token
        )
        email = mail.outbox[0]

        self.assertEqual(len(mail.outbox), 1)
        self.assertEqual(email.subject, expected_subject)
        self.assertIn(expected_intro, email.body)
        self.assertIn(expected_content, email.body)
        self.assertIn(expected_url, email.body)
Test that when a closed account is reactivated, they are sent an
dataset/ETHPy150Open nlhkabu/connect/connect/accounts/tests/test_utils.py/AccountUtilsTest.test_reactivation_email_sent_to_user