Ejemplo n.º 1
0
 def test_two_users_exist(self):
     UserProfile.objects.create(
         fxa_id='9999', email='*****@*****.**', username='******')
     UserProfile.objects.create(
         fxa_id='8888', email='*****@*****.**', username='******')
     with self.assertRaises(UserProfile.MultipleObjectsReturned):
         views.find_user({'uid': '9999', 'email': '*****@*****.**'})
Ejemplo n.º 2
0
 def test_two_users_exist(self):
     UserProfile.objects.create(
         fxa_id='9999', email='*****@*****.**', username='******')
     UserProfile.objects.create(
         fxa_id='8888', email='*****@*****.**', username='******')
     with self.assertRaises(UserProfile.MultipleObjectsReturned):
         views.find_user({'uid': '9999', 'email': '*****@*****.**'})
Ejemplo n.º 3
0
 def test_user_exists_with_both(self):
     user = UserProfile.objects.create(fxa_id='9999', email='*****@*****.**')
     found_user = views.find_user({'uid': '9999', 'email': '*****@*****.**'})
     assert user == found_user
Ejemplo n.º 4
0
 def test_user_exists_with_both(self):
     user = UserProfile.objects.create(fxa_id='9999', email='*****@*****.**')
     found_user = views.find_user({'uid': '9999', 'email': '*****@*****.**'})
     assert user == found_user