Ignore:
Timestamp:
26 Mar 2012, 10:53:00 (13 years ago)
Author:
Henrik Bettermann
Message:

Remove unneeded default values in interfaces. Adjust tests.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/applicants
Files:
5 edited

Legend:

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

    r7933 r7984  
    197197    code = schema.TextLine(
    198198        title = _(u'Code'),
    199         default = u'-',
     199        #default = u'-',
    200200        required = True,
    201201        readonly = True,
     
    205205        title = _(u'Title'),
    206206        required = True,
    207         default = u'-',
     207        #default = u'-',
    208208        readonly = True,
    209209        )
     
    212212        title = _(u'Application Target'),
    213213        required = True,
    214         default = None,
    215214        source = ApplicationTypeSource(),
    216215        readonly = True,
     
    220219        title = _(u'Entry Level'),
    221220        vocabulary = course_levels,
    222         default = 100,
     221        #default = 100,
    223222        required = True,
    224223        )
     
    227226        title = _(u'Year of Entrance'),
    228227        required = True,
    229         default = None,
    230228        values = year_range(),
    231229        readonly = True,
     
    235233        title = _(u'Applicants Container Type'),
    236234        required = True,
    237         default = None,
    238235        source = ApplicantContainerProviderSource(),
    239236        readonly = True,
     
    251248        title = _(u'Category for the grouping of certificates'),
    252249        required = True,
    253         default = None,
    254250        source = AppCatSource(),
    255251        )
     
    271267        title = _(u'Application Start Date'),
    272268        required = False,
    273         default = None,
    274269        )
    275270
     
    277272        title = _(u'Application Closing Date'),
    278273        required = False,
    279         default = None,
    280274        )
    281275
    282276    strict_deadline = schema.Bool(
    283277        title = _(u'Forbid additions after deadline (enddate)'),
    284         required = True,
     278        required = False,
    285279        default = True,
    286280        )
     
    322316        title = _(u'Application Target'),
    323317        required = True,
    324         default = None,
    325318        source = ApplicationTypeSource(),
    326319        readonly = False,
     
    330323        title = _(u'Year of Entrance'),
    331324        required = True,
    332         default = None,
    333325        values = year_range(),
    334326        readonly = False,
     
    338330        title = _(u'Applicants Container Type'),
    339331        required = True,
    340         default = None,
    341332        source = ApplicantContainerProviderSource(),
    342333        readonly = False,
     
    372363        readonly = False,
    373364        required = True,
    374         default = None,
    375365        source = contextual_reg_num_source,
    376366        )
     
    400390        title = _(u'State/LGA'),
    401391        default = 'foreigner',
    402         required = True,
     392        required = False,
    403393        )
    404394    sex = schema.Choice(
    405395        title = _(u'Sex'),
    406396        source = GenderSource(),
    407         default = u'm',
    408397        required = True,
    409398        )
     
    431420        title = _(u'School Grades'),
    432421        value_type = ResultEntryField(),
    433         required = True,
     422        required = False,
    434423        default = [],
    435424        )
     
    449438        title = _(u'Admitted Course of Study'),
    450439        source = CertificateSource(),
    451         default = None,
    452440        required = False,
    453441        )
     
    527515        title = _(u'Admitted Course of Study'),
    528516        source = CertificateSource(),
    529         default = None,
    530517        required = False,
    531518        readonly = True,
     
    550537    reg_number = schema.TextLine(
    551538        title = u'Registration Number',
    552         default = None,
    553539        required = False,
    554540        )
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_applicant_data.csv

    r7270 r7984  
    1 container_code,reg_number,firstname,lastname,date_of_birth,email,course1
    2 dp2011,1001,Aaren,Pieri,1990-01-02,xx@yy.zz,CERT1
    3 dp2011,1002,Aaren,Finau,1990-01-03,xx@yy.zz,CERT1
    4 dp2011,1003,Aaren,Berson,1990-01-04,xx@yy.zz,CERT1
     1container_code,reg_number,firstname,lastname,date_of_birth,email,course1,sex
     2dp2011,1001,Aaren,Pieri,1990-01-02,xx@yy.zz,CERT1,m
     3dp2011,1002,Aaren,Finau,1990-01-03,xx@yy.zz,CERT1,m
     4dp2011,1003,Aaren,Berson,1990-01-04,xx@yy.zz,CERT1,m
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_faulty_applicant_data.csv

    r7507 r7984  
    1 container_code,reg_number,firstname,lastname,date_of_birth,email,course1
    2 dp2011,1001,Aaren,Pieri,01/02/1990,xx@yy.zz,CERT1
     1container_code,reg_number,firstname,lastname,date_of_birth,email,course1,sex
     2dp2011,1001,Aaren,Pieri,01/02/1990,xx@yy.zz,CERT1,m
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py

    r7927 r7984  
    8282        applicantscontainer.prefix = 'app'
    8383        applicantscontainer.year = 2009
     84        applicantscontainer.entry_level = 100
    8485        applicantscontainer.application_category = 'basic'
    8586        delta = timedelta(days=10)
     
    246247        self.browser.getControl(name="form.prefix").value = ['app']
    247248        self.browser.getControl(name="form.year").value = ['2010']
     249        self.browser.getControl(name="form.entry_level").value = ['100']
    248250        self.browser.getControl(name="form.provider").value = [
    249251            'waeup.kofa.applicants.ApplicantsContainer']
     
    261263        self.browser.getControl(name="form.prefix").value = ['app']
    262264        self.browser.getControl(name="form.year").value = ['2010']
     265        self.browser.getControl(name="form.entry_level").value = ['100']
    263266        self.browser.getControl(name="form.provider").value = [
    264267            'waeup.kofa.applicants.ApplicantsContainer']
     
    276279        self.browser.getControl(name="form.prefix").value = ['app']
    277280        self.browser.getControl(name="form.year").value = ['2010']
     281        self.browser.getControl(name="form.entry_level").value = ['100']
    278282        self.browser.getControl(name="form.provider").value = [
    279283            'waeup.kofa.applicants.ApplicantsContainer']
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py

    r7925 r7984  
    5252        container.prefix = list(ApplicationTypeSource()(container))[0]
    5353        container.year = 2012
     54        container.entry_level = 100
    5455        provider = [
    5556            x for x in getUtilitiesFor(IApplicantsContainerProvider)
Note: See TracChangeset for help on using the changeset viewer.