Ignore:
Timestamp:
4 Jun 2012, 10:28:47 (12 years ago)
Author:
Henrik Bettermann
Message:

Fix test.

Replace default value of verdicts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.futminna/trunk/src/waeup/futminna/applicants/tests.py

    r8619 r8625  
    6565        self.pgcontainer.code = u'pgft2011'
    6666        self.pgcontainer.prefix = u'pgft'
     67        self.pgcontainer.application_category = u'pg_ft'
    6768        self.pgcontainer.year = 2011
    6869        self.pgcontainer.application_fee = 300.0
     
    7273        self.ugcontainer.code = u'putme2011'
    7374        self.ugcontainer.prefix = u'putme'
     75        self.ugcontainer.application_category = u'basic'
    7476        self.ugcontainer.year = 2011
    7577        self.ugcontainer.application_fee = 200.0
     
    8789        self.app['faculties']['fac1']['dep1'].certificates.addCertificate(
    8890            self.certificate)
     91        self.certificate2 = createObject('waeup.Certificate')
     92        self.certificate2.code = 'CERT2'
     93        self.certificate2.application_category = 'pg_ft'
     94        self.certificate2.start_level = 100
     95        self.certificate2.end_level = 500
     96        self.app['faculties']['fac1']['dep1'].certificates.addCertificate(
     97            self.certificate2)
    8998
    9099        # Add (customized) applicants
     
    122131        self.browser.getControl(name="form.firstname").value = 'John'
    123132        self.browser.getControl(name="form.lastname").value = 'Tester'
    124         self.browser.getControl(name="form.course1").value = ['CERT1']
    125133        self.browser.getControl(name="form.date_of_birth").value = '09/09/1988'
    126134        self.browser.getControl(name="form.lga").value = ['foreigner']
     
    152160        # We can save the applicant
    153161        self.fill_correct_values()
     162        self.browser.getControl(name="form.course1").value = ['CERT1']
    154163        self.browser.getControl("Save").click()
    155164        self.assertMatches('...Form has been saved...', self.browser.contents)
     
    170179        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    171180        self.fill_correct_values()
     181        self.browser.getControl(name="form.course1").value = ['CERT1']
    172182        self.browser.getControl("Save").click()
    173183        self.assertMatches('...Form has been saved...', self.browser.contents)
    174         self.fill_correct_values()
    175184        self.browser.getControl("Save").click()
    176185        self.browser.getControl("Add online payment ticket").click()
     
    191200        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    192201        self.fill_correct_values()
     202        self.browser.getControl(name="form.course1").value = ['CERT2']
    193203        self.browser.getControl(name="form.reg_number").value = '2345'
    194204        self.browser.getControl(name="form.firstname").value = 'Anna'
Note: See TracChangeset for help on using the changeset viewer.