Changeset 7639 for main/waeup.sirp/trunk/src/waeup/sirp
- Timestamp:
- 13 Feb 2012, 15:52:13 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
r7556 r7639 26 26 import grok 27 27 from zope.event import notify 28 from zope.component import createObject 28 from zope.component import createObject, queryUtility 29 29 from zope.component.hooks import setSite, clearSite 30 from zope.catalog.interfaces import ICatalog 30 31 from zope.security.interfaces import Unauthorized 31 32 from zope.securitypolicy.interfaces import IPrincipalRoleManager … … 1610 1611 self.browser.getControl("Get new login credentials").click() 1611 1612 self.assertTrue('An email with' in self.browser.contents) 1613 1614 def test_reindex(self): 1615 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 1616 self.browser.open('http://localhost/app/reindex') 1617 self.assertTrue('No catalog name provided' in self.browser.contents) 1618 self.browser.open('http://localhost/app/reindex?ctlg=xyz') 1619 self.assertTrue('xyz_catalog does not exist' in self.browser.contents) 1620 cat = queryUtility(ICatalog, name='students_catalog') 1621 results = cat.searchResults(student_id=(None, None)) 1622 self.assertEqual(len(results),1) 1623 cat.clear() 1624 results = cat.searchResults(student_id=(None, None)) 1625 self.assertEqual(len(results),0) 1626 self.browser.open('http://localhost/app/reindex?ctlg=students') 1627 self.assertTrue('Students reindexed' in self.browser.contents) 1628 results = cat.searchResults(student_id=(None, None)) 1629 self.assertEqual(len(results),1)
Note: See TracChangeset for help on using the changeset viewer.