@override_settings(USERPROFILES_PROFILE_ALLOW_EMAIL_CHANGE=True)
    def test_profile_change_email_enabled(self):
        self.client.login(username=self.data['username'], password=self.data['password'])

        change_url = reverse('userprofiles_profile_change')

        response = self.client.get(change_url)
        self.assertTrue('email' in response.context['form'].fields)

        self.client.post(change_url, {'email': self.data['new_email']})
        response = self.client.get(change_url)

        self.assertTrue(User.objects.filter(pk=self.user.pk,
            email=self.data['new_email']).exists())

#    def test_profile_change_test_extra_fields(self):
#        self.assertEqual(self.user.profile.short_info, '')
#
#        self.client.login(username=self.data['username'], password=self.data['password'])
#
#        change_url = reverse('userprofiles_profile_change')
#
#        response = self.client.get(change_url)
#
#        self.assertTrue('short_info' in response.context['form'].fields)
#
#        self.client.post(change_url, {'short_info': self.data['short_info']})
#        response = self.client.get(change_url)
#
#        self.assertEqual(self.user.profile.short_info, self.data['short_info'])
dataset/ETHPy150Open stephrdev/django-userprofiles/userprofiles/contrib/profiles/tests/test_views.py/ViewTests.test_profile_change_email_enabled/original