Example #1
0
 def test_user_find(self):
     user = UserProfile.objects.create(email='*****@*****.**')
     # Checks that you can have multiple copies of the same email and
     # that we only get distinct results back.
     user.update(email='*****@*****.**')
     user.update(email='*****@*****.**')
     user.update(email='*****@*****.**')
     assert [user] == list(find_users('*****@*****.**'))
     assert [user] == list(find_users('*****@*****.**'))
 def test_user_find(self):
     user = UserProfile.objects.create(email='*****@*****.**')
     # Checks that you can have multiple copies of the same email and
     # that we only get distinct results back.
     user.update(email='*****@*****.**')
     user.update(email='*****@*****.**')
     user.update(email='*****@*****.**')
     eq_([user], list(find_users('*****@*****.**')))
     eq_([user], list(find_users('*****@*****.**')))
Example #3
0
 def test_user_find_multiple(self):
     user_1 = UserProfile.objects.create(username='******',
                                         email='*****@*****.**')
     user_1.update(email='*****@*****.**')
     user_2 = UserProfile.objects.create(username='******',
                                         email='*****@*****.**')
     assert [user_1, user_2] == list(find_users('*****@*****.**'))
 def test_user_find_multiple(self):
     user_1 = UserProfile.objects.create(username='******',
                                         email='*****@*****.**')
     user_1.update(email='*****@*****.**')
     user_2 = UserProfile.objects.create(username='******',
                                         email='*****@*****.**')
     eq_([user_1, user_2], list(find_users('*****@*****.**')))