Esempio n. 1
0
 def test_identify_success_sets_fxa_data(self):
     assert self.user.fxa_id is None
     views.login_user(self.request, self.user, self.identity)
     user = self.user.reload()
     assert user.fxa_id == '9001'
     assert not user.has_usable_password()
Esempio n. 2
0
 def test_identify_success_account_exists_migrated_different_email(self):
     self.user.update(email='*****@*****.**')
     views.login_user(self.request, self.user, self.identity)
     user = self.user.reload()
     assert user.fxa_id == '9001'
     assert user.email == '*****@*****.**'
Esempio n. 3
0
 def test_user_gets_logged_in(self):
     views.login_user(self.request, self.user, self.identity)
     self.login.assert_called_with(self.request, self.user)
Esempio n. 4
0
 def test_identify_success_account_exists_migrated_different_email(self):
     self.user.update(email='*****@*****.**')
     views.login_user(self.request, self.user, self.identity)
     user = self.user.reload()
     assert user.fxa_id == '9001'
     assert user.email == '*****@*****.**'
Esempio n. 5
0
 def test_identify_success_sets_fxa_data(self):
     assert self.user.fxa_id is None
     views.login_user(self.request, self.user, self.identity)
     user = self.user.reload()
     assert user.fxa_id == '9001'
     assert not user.has_usable_password()
Esempio n. 6
0
 def test_user_gets_logged_in(self):
     views.login_user(self.request, self.user, self.identity)
     self.login.assert_called_with(self.request, self.user)
Esempio n. 7
0
 def test_email_address_can_change(self):
     self.user.update(email='*****@*****.**')
     views.login_user(self.request, self.user, self.identity)
     user = self.user.reload()
     assert user.fxa_id == '9001'
     assert user.email == '*****@*****.**'