Esempio n. 1
0
 def test_process_ax_data(self):
     """
     Tests integration of OpenID AX data with the current user's profile.
     """
     new_user = User(username = utils.generate_random_user_name())
     new_user.save()
     user_profile = UserProfile.objects.get_user_profile(new_user)
     utils.process_ax_data(new_user, self.openid.ax)
     user_profile = UserProfile.objects.get_user_profile(new_user)
     self.assertEqual(new_user.profile.display_name, 'hanbox')
     self.assertEqual(new_user.email, '*****@*****.**')
     new_user.delete()
Esempio n. 2
0
 def test_generate_random_user(self):
     """
     Tests generation of random user names.
     """
     username = utils.generate_random_user_name()
     self.assertTrue(utils.is_random(username))