Ignore:
Timestamp:
26 Nov 2011, 06:49:16 (13 years ago)
Author:
Henrik Bettermann
Message:

academics: Show students in departments.

students: Search for students in department.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py

    r7203 r7205  
    149149        self.certificate.end_level = 500
    150150        self.app['faculties']['fac1'] = Faculty()
    151         self.app['faculties']['fac1']['dep1'] = Department()
     151        self.app['faculties']['fac1']['dep1'] = Department(code='dep1')
    152152        self.app['faculties']['fac1']['dep1'].certificates.addCertificate(
    153153            self.certificate)
     
    196196        self.student['studycourse'].current_verdict = 'A'
    197197        self.student['studycourse'].current_level = 100
     198        # Update the catalog
     199        notify(grok.ObjectModifiedEvent(self.student))
    198200
    199201        # Put the prepopulated site into test ZODB and prepare test
     
    263265        self.browser.getControl(name="searchtype").value = ['student_id']
    264266        self.browser.getControl(name="searchterm").value = self.student_id
     267        self.browser.getControl("Search").click()
     268        self.assertTrue('Anna Tester' in self.browser.contents)
     269
     270        # We can find a student in a certain department
     271        self.browser.open(self.container_path)
     272        self.browser.getControl(name="searchtype").value = ['depcode']
     273        self.browser.getControl(name="searchterm").value = 'dep1'
    265274        self.browser.getControl("Search").click()
    266275        self.assertTrue('Anna Tester' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.