Changeset 6434 for main/waeup.sirp/trunk
- Timestamp:
- 20 Jun 2011, 17:21:35 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/tests/test_catalog.py
r6433 r6434 30 30 from waeup.sirp.app import University 31 31 from waeup.sirp.testing import FunctionalLayer 32 from waeup.sirp.accesscodes.accesscodes import AccessCode, AccessCodeBatch 32 from waeup.sirp.accesscodes.accesscodes import ( 33 AccessCode, AccessCodeBatch, invalidate_accesscode,) 33 34 34 35 … … 90 91 results = [x for x in results] # Turn results generator into list 91 92 assert len(results) == 0 93 94 def test_search_history(self): 95 # We can search for certain history entries 96 # To update history we use `invalidate_accesscode` 97 invalidate_accesscode( 98 'APP-1-11111111', comment='used by Tester') 99 100 # Now we want to find the term ``Tester`` in histories of all acs 101 cat = queryUtility(ICatalog, name='accesscodes_catalog') 102 results = cat.searchResults(history='Tester') 103 results = [x for x in results] # Turn results generator into list 104 assert len(results) == 1 105 assert results[0] is self.ac1
Note: See TracChangeset for help on using the changeset viewer.