Beispiel #1
0
 def test_user_is_created(self):
     user_qs = UserProfile.objects.filter(email='*****@*****.**')
     assert not user_qs.exists()
     views.register_user(self.request, self.identity)
     assert user_qs.exists()
     user = user_qs.get()
     assert user.username.startswith('anonymous-')
     assert user.fxa_id == '9005'
     self.login.assert_called_with(self.request, user)
Beispiel #2
0
 def test_user_is_created(self):
     user_qs = UserProfile.objects.filter(email='*****@*****.**')
     assert not user_qs.exists()
     views.register_user(self.request, self.identity)
     assert user_qs.exists()
     user = user_qs.get()
     assert user.username.startswith('anonymous-')
     assert user.fxa_id == '9005'
     self.login.assert_called_with(self.request, user)
Beispiel #3
0
 def test_username_taken_creates_user(self):
     UserProfile.objects.create(email='*****@*****.**',
                                username='******')
     user_qs = UserProfile.objects.filter(email='*****@*****.**')
     assert not user_qs.exists()
     views.register_user(self.request, self.identity)
     assert user_qs.exists()
     user = user_qs.get()
     assert user.username.startswith('anonymous-')
     assert user.fxa_id == '9005'
Beispiel #4
0
 def test_username_taken_creates_user(self):
     UserProfile.objects.create(
         email='*****@*****.**', username='******')
     user_qs = UserProfile.objects.filter(email='*****@*****.**')
     assert not user_qs.exists()
     views.register_user(self.request, self.identity)
     assert user_qs.exists()
     user = user_qs.get()
     assert user.username.startswith('anonymous-')
     assert user.fxa_id == '9005'