Ignore:
Timestamp:
9 Apr 2012, 16:35:24 (13 years ago)
Author:
Henrik Bettermann
Message:

Add tests for changes in previous revision and remove additional bug found with these tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_catalog.py

    r7811 r8082  
    6363        self.student = self.app['students'][self.student_id]
    6464        self.student['studycourse'].certificate = self.certificate
     65        self.student['studycourse'].current_session = 2010
    6566        # Update the students_catalog
    6667        notify(grok.ObjectModifiedEvent(self.student))
     
    128129        assert results[0] is self.app['students'][self.student_id]
    129130
     131    def test_search_by_session(self):
     132        # We can find a student in a certain session
     133        cat = queryUtility(ICatalog, name='students_catalog')
     134        results = cat.searchResults(current_session=(2010,2010))
     135        results = [x for x in results] # Turn results generator into list
     136        assert len(results) == 1
     137        assert results[0] is self.app['students'][self.student_id]
     138
    130139class CourseTicketCatalogTests(CatalogTestSetup):
    131140
Note: See TracChangeset for help on using the changeset viewer.