Ignore:
Timestamp:
2 May 2013, 05:30:25 (12 years ago)
Author:
Henrik Bettermann
Message:

At KwaraPoly? application_category and study_mode are basically identical. We need categories for full-time and part-time.

prend has been renamed to rmd. The students_catalog must be reindexed!

Location:
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/applicants
Files:
2 edited

Legend:

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

    r10132 r10133  
    5353        setSite(app)
    5454
    55         # Add nd applicants container
    56         self.ndcontainer = ApplicantsContainer()
    57         self.ndcontainer.mode = 'create'
    58         self.ndcontainer.code = u'nd2011'
    59         self.ndcontainer.prefix = u'nd'
    60         self.ndcontainer.application_category = u'nd'
    61         self.ndcontainer.year = 2011
    62         self.ndcontainer.application_fee = 300.0
    63         self.ndcontainer.title = u'This is the nd2011 container'
    64         self.app['applicants']['nd2011'] = self.ndcontainer
     55        # Add ndft applicants container
     56        self.ndftcontainer = ApplicantsContainer()
     57        self.ndftcontainer.mode = 'create'
     58        self.ndftcontainer.code = u'ndft2011'
     59        self.ndftcontainer.prefix = u'ndft'
     60        self.ndftcontainer.application_category = u'ndft'
     61        self.ndftcontainer.year = 2011
     62        self.ndftcontainer.application_fee = 300.0
     63        self.ndftcontainer.title = u'This is the ndft2011 container'
     64        self.app['applicants']['ndft2011'] = self.ndftcontainer
    6565
    6666        delta = datetime.timedelta(days=10)
    67         self.ndcontainer.startdate = datetime.datetime.now(pytz.utc) - delta
    68         self.ndcontainer.enddate = datetime.datetime.now(pytz.utc) + delta
     67        self.ndftcontainer.startdate = datetime.datetime.now(pytz.utc) - delta
     68        self.ndftcontainer.enddate = datetime.datetime.now(pytz.utc) + delta
    6969
    7070        # Populate university
    7171        self.certificate = createObject('waeup.Certificate')
    7272        self.certificate.code = 'CERT1'
    73         self.certificate.application_category = 'nd'
     73        self.certificate.application_category = 'ndft'
    7474        self.certificate.start_level = 100
    7575        self.certificate.end_level = 500
     
    8181
    8282        # Add (customized) applicants
    83         ndapplicant = createObject(u'waeup.Applicant')
    84         ndapplicant.firstname = u'Anna'
    85         ndapplicant.lastname = u'Post'
    86         self.app['applicants']['nd2011'].addApplicant(ndapplicant)
    87         self.ndapplication_number = ndapplicant.application_number
    88         self.ndapplicant = self.app['applicants']['nd2011'][
    89             self.ndapplication_number]
    90         self.ndapplicant_path = ('http://localhost/app/applicants/nd2011/%s'
    91             % self.ndapplication_number)
     83        ndftapplicant = createObject(u'waeup.Applicant')
     84        ndftapplicant.firstname = u'Anna'
     85        ndftapplicant.lastname = u'Post'
     86        self.app['applicants']['ndft2011'].addApplicant(ndftapplicant)
     87        self.ndftapplication_number = ndftapplicant.application_number
     88        self.ndftapplicant = self.app['applicants']['ndft2011'][
     89            self.ndftapplication_number]
     90        self.ndftapplicant_path = ('http://localhost/app/applicants/ndft2011/%s'
     91            % self.ndftapplication_number)
    9292
    9393        self.browser = Browser()
     
    111111
    112112    def test_manage_and_view_applicant(self):
    113         # Managers can manage nd applicants.
     113        # Managers can manage ndft applicants.
    114114        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
    115         self.browser.open(self.ndapplicant_path)
     115        self.browser.open(self.ndftapplicant_path)
    116116        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    117117        self.assertTrue("'O' Level" in self.browser.contents)
    118118        self.assertFalse("Higher" in self.browser.contents)
    119         self.browser.open(self.ndapplicant_path + '/manage')
     119        self.browser.open(self.ndftapplicant_path + '/manage')
    120120        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    121121        self.assertTrue("'O' Level" in self.browser.contents)
    122122        self.assertTrue("Higher" in self.browser.contents)
    123         self.browser.open(self.ndapplicant_path + '/edit')
     123        self.browser.open(self.ndftapplicant_path + '/edit')
    124124        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    125125        self.assertTrue("'O' Level" in self.browser.contents)
    126126        self.assertFalse("Higher" in self.browser.contents)
    127         self.browser.open(self.ndapplicant_path + '/application_slip.pdf')
     127        self.browser.open(self.ndftapplicant_path + '/application_slip.pdf')
    128128        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    129         # Now we turn the nd applicant into an hnd applicant.
    130         self.ndapplicant.applicant_id = u'hnd_anything'
    131         self.browser.open(self.ndapplicant_path)
     129        # Now we turn the ndft applicant into an hndft applicant.
     130        self.ndftapplicant.applicant_id = u'hndft_anything'
     131        self.browser.open(self.ndftapplicant_path)
    132132        self.assertTrue("Higher" in self.browser.contents)
    133133        self.assertTrue("'O' Level" in self.browser.contents)
    134         self.browser.open(self.ndapplicant_path + '/edit')
     134        self.browser.open(self.ndftapplicant_path + '/edit')
    135135        self.assertTrue("Higher" in self.browser.contents)
    136136        self.assertTrue("'O' Level" in self.browser.contents)
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/applicants/utils.py

    r10132 r10133  
    3232
    3333    APP_TYPES_DICT = {
    34         'prend': ['Pre-ND Programme', 'RP'],
    35         'hnd': ['HND Programmes', 'hnd'],
    36         'nd': ['ND Programmes', 'nd'],
     34        'rmd': ['Remedial Programme', 'RP'],
     35        'hndft': ['HND Full-Time Programmes', 'HNDFT'],
     36        'hndpt': ['HND Part-Time Programmes', 'HNDPT'],
     37        'ndft': ['ND Full-Time Programmes', 'NDFT'],
     38        'ndpt': ['ND Part-Time Programmes', 'NDPT'],
    3739        'putme': ['Post-UTME Screening Exercise', 'PUTME'],
    3840        'app': ['General Studies', 'APP'],
Note: See TracChangeset for help on using the changeset viewer.