예제 #1
0
 def afterSetUp(self):
     FunctionalTestCase.afterSetUp(self)
     self.setRoles([
         'Manager',
     ])
     self.create = self.portal.invokeFactory
     self.newid = self.create(type_name='SignupSheet', id='a-new-form')
     self.form = getattr(self.portal, self.newid)
 def afterSetUp(self):
     FunctionalTestCase.afterSetUp(self)
     self.setRoles(['Manager', ])
     self.create = self.portal.invokeFactory
     self.newid = self.create(type_name='SignupSheet', id='a-new-form')
     self.form = getattr(self.portal, self.newid)
     self.form.registrants.invokeFactory('registrant', id='rgs1')
     self.form.registrants.invokeFactory('registrant', id='rgs2')
     self.form.registrants.invokeFactory('registrant', id='rgs3')
 def afterSetUp(self):
     FunctionalTestCase.afterSetUp(self)
     self.pwf = getToolByName(self.portal, 'portal_workflow')
     self.setRoles(['Manager', ])
     self.create = self.portal.invokeFactory
     self.newid = self.create(type_name='SignupSheet', id='a-new-form')
     self.form = getattr(self.portal, self.newid)
     self.form.setEventsize(2)
     self.form.setWaitlist_size(2)
     self.form.registrants.invokeFactory('registrant', id='rgs1')
 def afterSetUp(self):
     FunctionalTestCase.afterSetUp(self)
     self.pwf = getToolByName(self.portal, 'portal_workflow')
     self.setRoles(['Manager', ])
     self.create = self.portal.invokeFactory
     self.newid = self.create(type_name='SignupSheet', id='a-new-form')
     self.form = getattr(self.portal, self.newid)
     self.form.registrants.invokeFactory('registrant', id='rgs1')
     self.registrant = self.form.registrants['rgs1']
     # need to mock onSuccess: we don't test mail
     self.form['user_notification_mailer'].onSuccess = onSuccessMock
 def afterSetUp(self):
     FunctionalTestCase.afterSetUp(self)
     self.pwf = getToolByName(self.portal, 'portal_workflow')
     self.setRoles([
         'Manager',
     ])
     self.create = self.portal.invokeFactory
     self.newid = self.create(type_name='SignupSheet', id='a-new-form')
     self.form = getattr(self.portal, self.newid)
     self.form.registrants.invokeFactory('registrant', id='rgs1')
     self.registrant = self.form.registrants['rgs1']
     # need to mock onSuccess: we don't test mail
     self.form['user_notification_mailer'].onSuccess = onSuccessMock
    def afterSetUp(self):
        FunctionalTestCase.afterSetUp(self)
        self.pwf = getToolByName(self.portal, 'portal_workflow')
        self.setRoles(['Manager', ])
        self.create = self.portal.invokeFactory
        self.newid = self.create(type_name='SignupSheet', id='a-new-form')
        self.form = getattr(self.portal, self.newid)

        self.form.registrants.invokeFactory('registrant', id='rgs1')
        self.r1 = self.form.registrants['rgs1']
        self.r1.getField('name').set(self.r1, 'John')
        self.r1.getField('surname').set(self.r1, 'Dillinger')
        self.r1.getField('email').set(self.r1, '*****@*****.**')

        self.form.registrants.invokeFactory('registrant', id='rgs2')
        self.r2 = self.form.registrants['rgs2']
        self.r2.getField('name').set(self.r2, 'Frank')
        self.r2.getField('surname').set(self.r2, 'Lukas')
        self.r2.getField('email').set(self.r2, '*****@*****.**')