- Timestamp:
- 26 Oct 2012, 20:59:03 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.futminna/trunk/src/waeup/futminna/students/tests/test_browser.py
r9409 r9431 28 28 from waeup.kofa.university.department import Department 29 29 from waeup.kofa.students.tests.test_browser import StudentsFullSetup 30 from waeup.kofa.students.accommodation import BedTicket 30 31 from waeup.kofa.testing import FunctionalTestCase 31 32 from waeup.kofa.interfaces import ( … … 87 88 self.app['faculties']['SSE']['dep1'].certificates.addCertificate( 88 89 self.certificate2) 90 # Create EET faculty with certificate 91 self.app['faculties']['EET'] = Faculty(code='EET') 92 self.app['faculties']['EET']['dep1'] = Department(code='dep1') 93 self.certificate3 = createObject('waeup.Certificate') 94 self.certificate3.code = u'CERT3' 95 self.certificate3.application_category = 'basic' 96 self.certificate3.study_mode = 'ug_ft' 97 self.certificate3.start_level = 100 98 self.certificate3.end_level = 300 99 self.app['faculties']['EET']['dep1'].certificates.addCertificate( 100 self.certificate3) 89 101 # Set study course attributes of test student 90 102 self.student['studycourse'].certificate = self.certificate2 … … 160 172 161 173 error, payment = utils.setPaymentDetails('hostel_maintenance',self.student) 174 self.assertEqual(error, 'You have not yet booked accommodation.') 175 bedticket = BedTicket() 176 bedticket.booking_session = 2004 177 bedticket.bed_type = u'any bed type' 178 bedticket.bed = self.app['hostels']['hall-1']['hall-1_A_101_A'] 179 bedticket.bed_coordinates = u'My bed coordinates' 180 self.student['accommodation'].addBedTicket(bedticket) 181 error, payment = utils.setPaymentDetails('hostel_maintenance',self.student) 162 182 self.assertEqual(payment.p_level, 100) 163 183 self.assertEqual(payment.p_session, 2004) 164 184 self.assertEqual(payment.amount_auth, 10000.0) 165 self.assertEqual(payment.p_item, u'sse_male_fr') 166 self.assertEqual(error, None) 167 168 self.student['studycourse'].certificate = self.certificate 169 error, payment = utils.setPaymentDetails('hostel_maintenance',self.student) 170 self.assertEqual(payment.p_level, 100) 171 self.assertEqual(payment.p_session, 2004) 172 self.assertEqual(payment.amount_auth, 10000.0) 173 self.assertEqual(payment.p_item, u'regular_male_fr') 174 self.assertEqual(error, None) 175 176 error, payment = utils.setPaymentDetails('block_h_maintenance',self.student) 185 self.assertEqual(payment.p_item, u'My bed coordinates') 186 self.assertEqual(error, None) 187 188 self.student['studycourse'].certificate = self.certificate3 189 error, payment = utils.setPaymentDetails('hostel_maintenance',self.student) 190 self.assertEqual(payment.p_level, 100) 191 self.assertEqual(payment.p_session, 2004) 192 self.assertEqual(payment.amount_auth, 12000.0) 193 self.assertEqual(payment.p_item, u'My bed coordinates') 194 self.assertEqual(error, None) 195 196 bedticket.bed.bed_id = u'block-h_anything' 197 error, payment = utils.setPaymentDetails('hostel_maintenance',self.student) 177 198 self.assertEqual(payment.p_level, 100) 178 199 self.assertEqual(payment.p_session, 2004) 179 200 self.assertEqual(payment.amount_auth, 15000.0) 180 self.assertEqual(payment.p_item, u' regular_male_fr')201 self.assertEqual(payment.p_item, u'My bed coordinates') 181 202 self.assertEqual(error, None) 182 203
Note: See TracChangeset for help on using the changeset viewer.