Changeset 9426
- Timestamp:
- 26 Oct 2012, 17:55:56 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py
r9421 r9426 40 40 from waeup.kofa.students.student import Student 41 41 from waeup.kofa.students.studylevel import StudentStudyLevel, CourseTicket 42 from waeup.kofa.students.accommodation import BedTicket 42 43 from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase 43 44 from waeup.kofa.university.faculty import Faculty 44 45 from waeup.kofa.university.department import Department 46 from waeup.kofa.hostels.hostel import Hostel, Bed, NOT_OCCUPIED 45 47 46 48 … … 162 164 self.app['faculties']['fac1']['dep1'].certificates.addCertificate( 163 165 self.certificate) 166 167 # Create a hostel with two beds 168 hostel = Hostel() 169 hostel.hostel_id = u'hall-1' 170 hostel.hostel_name = u'Hall 1' 171 self.app['hostels'].addHostel(hostel) 172 bed = Bed() 173 bed.bed_id = u'hall-1_A_101_A' 174 bed.bed_number = 1 175 bed.owner = NOT_OCCUPIED 176 bed.bed_type = u'regular_male_fr' 177 self.app['hostels'][hostel.hostel_id].addBed(bed) 178 bed = Bed() 179 bed.bed_id = u'hall-1_A_101_B' 180 bed.bed_number = 2 181 bed.owner = NOT_OCCUPIED 182 bed.bed_type = u'regular_female_fr' 183 self.app['hostels'][hostel.hostel_id].addBed(bed) 164 184 165 185 self.logfile = os.path.join( … … 223 243 ticket.semester = 2 224 244 study_level[ticket.code] = ticket 245 246 bedticket = BedTicket() 247 bedticket.booking_session = 2004 248 bedticket.bed_type = u'any bed type' 249 bedticket.bed = self.app['hostels']['hall-1']['hall-1_A_101_A'] 250 student['accommodation'].addBedTicket(bedticket) 251 225 252 self.add_payment(student) 226 253 return student
Note: See TracChangeset for help on using the changeset viewer.