Ignore:
Timestamp:
15 Jun 2019, 12:30:51 (6 years ago)
Author:
Henrik Bettermann
Message:

Add course3 field.

Location:
main/waeup.aaue/trunk/src/waeup/aaue/applicants
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/interfaces.py

    r15275 r15455  
    123123        )
    124124
     125    course3 = schema.Choice(
     126        title = _(u'3rd Choice Course of Study'),
     127        source = AppCatCertificateSource(),
     128        required = False,
     129        )
     130
    125131    fst_sit_fname = schema.TextLine(
    126132        title = _(u'Full Name'),
     
    506512
    507513    @invariant
    508     def second_choice(applicant):
     514    def course_choice(applicant):
    509515        if applicant.course1 == applicant.course2:
    510516            raise Invalid(_("2nd choice course must differ from 1st choice course."))
     517        if applicant.course1 == applicant.course3:
     518            raise Invalid(_("3rd choice course must differ from 1st choice course."))
     519        if applicant.course2 == applicant.course3:
     520            raise Invalid(_("3rd choice course must differ from 2nd choice course."))
    511521
    512522#ICustomUGApplicant['programme_type'].order = IApplicantBaseData[
  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/tests/test_applicantcopier.py

    r14250 r15455  
    2424from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState
    2525from zope.event import notify
    26 from zope.component import getUtility
     26from zope.component import getUtility, createObject
    2727from zope.i18n import translate
    2828from waeup.kofa.interfaces import IExtFileStore, IFileStoreNameChooser
     
    3838    def setUp(self):
    3939        super(ApplicantCopierFunctionalTests, self).setUp()
     40        certificate = createObject('waeup.Certificate')
     41        certificate.code = 'CERT2'
     42        certificate.title = 'New Certificate'
     43        certificate.application_category = 'basic'
     44        self.app['faculties']['fac1']['dep1'].certificates.addCertificate(
     45            certificate)
    4046        return
    4147
     
    4652        self.fill_correct_values()
    4753        self.browser.getControl("Save").click()
     54        self.browser.getControl(name="form.course2").value = ['CERT2']
    4855        self.browser.getControl(name="form.nationality").value = ['NG']
    4956        self.browser.getControl(name="form.lga").value = ['abia_aba_north']
  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/tests/test_browser.py

    r15266 r15455  
    5656
    5757    def test_payment(self):
     58        certificate = createObject('waeup.Certificate')
     59        certificate.code = 'CERT2'
     60        certificate.title = 'New Certificate'
     61        certificate.application_category = 'basic'
     62        self.app['faculties']['fac1']['dep1'].certificates.addCertificate(
     63            certificate)
    5864        configuration = SessionConfiguration()
    5965        configuration.academic_session = session_1
     
    6268        self.login()
    6369        self.browser.open(self.edit_path)
     70        self.browser.getControl(name="form.course2").value = ['CERT2']
    6471        self.browser.getControl(name="form.date_of_birth").value = '09/09/1988'
    6572        self.browser.getControl(name="form.email").value = 'xx@yy.zz'
Note: See TracChangeset for help on using the changeset viewer.