Changeset 9736 for main/waeup.kofa/trunk/src/waeup/kofa
- Timestamp:
- 28 Nov 2012, 16:17:14 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/catalog.py
r9486 r9736 46 46 faccode = index.Field(attribute='faccode') 47 47 current_session = index.Field(attribute='current_session') 48 current_level = index.Field(attribute='current_level') 48 49 current_mode = index.Field(attribute='current_mode') 49 50 -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_catalog.py
r9647 r9736 41 41 self.app['faculties'][facname][deptname] = Department(code=deptname) 42 42 cert = createObject('waeup.Certificate') 43 cert.start_level = 100 44 cert.end_level = 500 43 45 cert.code = certname 44 46 self.app['faculties'][facname][deptname].certificates.addCertificate( … … 70 72 self.student['studycourse'].certificate = self.certificate 71 73 self.student['studycourse'].current_session = 2010 74 self.student['studycourse'].current_level = 100 72 75 # Update the students_catalog 73 76 notify(grok.ObjectModifiedEvent(self.student)) … … 143 146 assert results[0] is self.app['students'][self.student_id] 144 147 148 def test_search_by_level(self): 149 # We can find a student in a certain level 150 cat = queryUtility(ICatalog, name='students_catalog') 151 results = cat.searchResults(current_level=(100, 100)) 152 results = [x for x in results] # Turn results generator into list 153 assert len(results) == 1 154 assert results[0] is self.app['students'][self.student_id] 155 return 156 145 157 class CourseTicketCatalogTests(CatalogTestSetup): 146 158
Note: See TracChangeset for help on using the changeset viewer.