def test_invite_user_workflow(self): superuser = self.cfa_user organization = self.sf_pubdef new_user = auth_mock.fake_user_data() self.run_sequence( "Invitation and signup", [ S.get('went to login', reverse(AuthCase.login_view)), S.fill_form( 'entered login info', login=superuser.email, password=fake_password), S.get( 'went to send invite view', reverse( AuthCase.send_invite_view)), S.fill_form( 'submitted email and an org', email=new_user['email'], organization=str( organization.id)), S.get('logged out', reverse(AuthCase.logout_view)), S.check_email('invite email'), S.get('clicked link in email', self.get_link_from_email), S.fill_form( 'entered name and password', name='Bartholomew McHumanperson', password1=fake_password), S.get('went to applications', reverse('intake-app_index')), ], base.SMALL_DESKTOP)
def test_login_and_password_reset_workflow(self): user = self.ccpubdef_users[0] self.run_sequence("Fail login and reset password", [ S.get('went to login', reverse(AuthCase.login_view)), S.fill_form( 'entered login info', login=user.email, password="******"), S.click_on('clicked forgot password', "Forgot Password?"), S.fill_form('entered email', email=user.email), S.check_email('reset email'), S.get('clicked on link in email', self.get_link_from_email), S.fill_form('entered new password', password=fake_password), ], base.SMALL_DESKTOP)
def test_login_and_password_reset_workflow(self): user = self.users[0] found_user = auth_models.User.objects.filter(email=user.email).first() self.run_sequence( "Fail login and reset password", [ S.get('went to login', reverse(AuthCase.login_view)), S.fill_form('entered login info', login=user.email, password="******"), S.click_on('clicked forgot password', "Forgot Password?"), S.fill_form('entered email', email=user.email), S.check_email('reset email'), S.get('clicked on link in email', self.get_link_from_email), S.fill_form('entered new password', password=fake_password), ], base.SMALL_DESKTOP )