Example #1
0
    def test_resend_works(self):
        ConfigDAO.get('invitations', 'enabled').AndReturn(True)
        self.fake_client_set.identity_admin.users.get(self.uid)\
                .AndReturn(self.user)
        users.InvitesDAO.create(self.uid, self.user.email)\
                .AndReturn(self.invite)
        users.send_invitation(self.user.email, self.invite.code,
                              None, greeting=self.user.fullname)
        users.user_to_view(self.user, self.invite, send_code=False)\
                .AndReturn('REPLY')

        self.mox.ReplayAll()
        data = self.interact({})
        self.assertEquals(data, 'REPLY')
Example #2
0
    def test_resend_works(self):
        ConfigDAO.get('invitations', 'enabled').AndReturn(True)
        self.fake_client_set.identity_admin.users.get(self.uid)\
                .AndReturn(self.user)
        users.InvitesDAO.create(self.uid, self.user.email)\
                .AndReturn(self.invite)
        users.send_invitation(self.user.email,
                              self.invite.code,
                              None,
                              greeting=self.user.fullname)
        users.user_to_view(self.user, self.invite, send_code=False)\
                .AndReturn('REPLY')

        self.mox.ReplayAll()
        data = self.interact({})
        self.assertEquals(data, 'REPLY')