Changeset 10133 for main/waeup.kwarapoly/trunk
- Timestamp:
- 2 May 2013, 05:30:25 (12 years ago)
- Location:
- main/waeup.kwarapoly/trunk/src/waeup/kwarapoly
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/applicants/tests/test_browser.py
r10132 r10133 53 53 setSite(app) 54 54 55 # Add nd applicants container56 self.nd container = ApplicantsContainer()57 self.nd container.mode = 'create'58 self.nd container.code = u'nd2011'59 self.nd container.prefix = u'nd'60 self.nd container.application_category = u'nd'61 self.nd container.year = 201162 self.nd container.application_fee = 300.063 self.nd container.title = u'This is the nd2011 container'64 self.app['applicants']['nd 2011'] = self.ndcontainer55 # 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 65 65 66 66 delta = datetime.timedelta(days=10) 67 self.nd container.startdate = datetime.datetime.now(pytz.utc) - delta68 self.nd container.enddate = datetime.datetime.now(pytz.utc) + delta67 self.ndftcontainer.startdate = datetime.datetime.now(pytz.utc) - delta 68 self.ndftcontainer.enddate = datetime.datetime.now(pytz.utc) + delta 69 69 70 70 # Populate university 71 71 self.certificate = createObject('waeup.Certificate') 72 72 self.certificate.code = 'CERT1' 73 self.certificate.application_category = 'nd '73 self.certificate.application_category = 'ndft' 74 74 self.certificate.start_level = 100 75 75 self.certificate.end_level = 500 … … 81 81 82 82 # Add (customized) applicants 83 nd applicant = createObject(u'waeup.Applicant')84 nd applicant.firstname = u'Anna'85 nd applicant.lastname = u'Post'86 self.app['applicants']['nd 2011'].addApplicant(ndapplicant)87 self.nd application_number = ndapplicant.application_number88 self.nd applicant = self.app['applicants']['nd2011'][89 self.nd application_number]90 self.nd applicant_path = ('http://localhost/app/applicants/nd2011/%s'91 % self.nd application_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) 92 92 93 93 self.browser = Browser() … … 111 111 112 112 def test_manage_and_view_applicant(self): 113 # Managers can manage nd applicants.113 # Managers can manage ndft applicants. 114 114 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 115 self.browser.open(self.nd applicant_path)115 self.browser.open(self.ndftapplicant_path) 116 116 self.assertEqual(self.browser.headers['Status'], '200 Ok') 117 117 self.assertTrue("'O' Level" in self.browser.contents) 118 118 self.assertFalse("Higher" in self.browser.contents) 119 self.browser.open(self.nd applicant_path + '/manage')119 self.browser.open(self.ndftapplicant_path + '/manage') 120 120 self.assertEqual(self.browser.headers['Status'], '200 Ok') 121 121 self.assertTrue("'O' Level" in self.browser.contents) 122 122 self.assertTrue("Higher" in self.browser.contents) 123 self.browser.open(self.nd applicant_path + '/edit')123 self.browser.open(self.ndftapplicant_path + '/edit') 124 124 self.assertEqual(self.browser.headers['Status'], '200 Ok') 125 125 self.assertTrue("'O' Level" in self.browser.contents) 126 126 self.assertFalse("Higher" in self.browser.contents) 127 self.browser.open(self.nd applicant_path + '/application_slip.pdf')127 self.browser.open(self.ndftapplicant_path + '/application_slip.pdf') 128 128 self.assertEqual(self.browser.headers['Status'], '200 Ok') 129 # Now we turn the nd applicant into an hndapplicant.130 self.nd applicant.applicant_id = u'hnd_anything'131 self.browser.open(self.nd applicant_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) 132 132 self.assertTrue("Higher" in self.browser.contents) 133 133 self.assertTrue("'O' Level" in self.browser.contents) 134 self.browser.open(self.nd applicant_path + '/edit')134 self.browser.open(self.ndftapplicant_path + '/edit') 135 135 self.assertTrue("Higher" in self.browser.contents) 136 136 self.assertTrue("'O' Level" in self.browser.contents) -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/applicants/utils.py
r10132 r10133 32 32 33 33 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'], 37 39 'putme': ['Post-UTME Screening Exercise', 'PUTME'], 38 40 'app': ['General Studies', 'APP'], -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py
r10131 r10133 300 300 self.certificate2 = createObject('waeup.Certificate') 301 301 self.certificate2.code = u'CERT2' 302 self.certificate2.application_category = 'nd '302 self.certificate2.application_category = 'ndft' 303 303 self.certificate2.study_mode = 'nd_ft' 304 304 self.certificate2.start_level = 100 … … 306 306 self.app['faculties']['CPGS']['dep1'].certificates.addCertificate( 307 307 self.certificate2) 308 self.applicantscontainer.application_category = 'nd '308 self.applicantscontainer.application_category = 'ndft' 309 309 self.applicant.applicant_id = u'nd_anything' 310 310 … … 346 346 in self.browser.contents) 347 347 348 # hnd fee goes to another account348 # hndft fee goes to another account 349 349 self.applicant.applicant_id = u'hnd_anything' 350 350 self.browser.open(self.manage_path) -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/utils/utils.py
r10121 r10133 29 29 APP_CATS_DICT = { 30 30 'basic': 'Basic', 31 'nd': 'National Diploma Programmes', 32 'hnd': 'Higher National Diploma Programmes', 31 'ndft': 'National Diploma Full-Time Programmes', 32 'ndpt': 'National Diploma Part-Time Programmes', 33 'hndft': 'Higher National Diploma Full-Time Programmes', 34 'hndpt': 'Higher National Diploma Part-Time Programmes', 33 35 'pgd': 'Postgraduate Diploma Programmes', 34 ' prend': 'Pre-NDProgrammes',36 'rmd': 'Remedial Programmes', 35 37 } 36 38 37 39 STUDY_MODES_DICT = { 38 'nd_ft': 'National Diploma Full 39 'nd_pt': 'National Diploma Part 40 'hnd_ft': 'Higher National Diploma Full 41 'hnd_pt': 'Higher National Diploma Part 42 'pgd_ft': 'Postgraduate Diploma Full 43 'pgd_pt': 'Postgraduate Diploma Part 44 ' prend': 'Pre-ND',40 'nd_ft': 'National Diploma Full-Time', 41 'nd_pt': 'National Diploma Part-Time', 42 'hnd_ft': 'Higher National Diploma Full-Time', 43 'hnd_pt': 'Higher National Diploma Part-Time', 44 'pgd_ft': 'Postgraduate Diploma Full-Time', 45 'pgd_pt': 'Postgraduate Diploma Part-Time', 46 'rmd': 'Remedial', 45 47 } 46 48
Note: See TracChangeset for help on using the changeset viewer.