Changeset 6436 for main/waeup.sirp/trunk/src/waeup/sirp
- Timestamp:
- 20 Jun 2011, 19:51:50 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/tests/test_catalog.py
r6435 r6436 108 108 # We can seach for disabled access codes 109 109 disable_accesscode('APP-1-11111111') 110 # Now we want to find the term ``Tester`` in histories of all acs110 # Now we want to find the disabled access code 111 111 cat = queryUtility(ICatalog, name='accesscodes_catalog') 112 112 results1 = cat.searchResults(disabled=(True, True)) … … 119 119 assert len(results2) == 2 120 120 assert [x for x in results2] == [self.ac2, self.ac3] 121 122 def test_search_used(self): 123 # We can search for used/unused access codes 124 invalidate_accesscode('APP-1-11111111') 125 # Now we want to find the invalidated access code 126 cat = queryUtility(ICatalog, name='accesscodes_catalog') 127 results1 = cat.searchResults(used=(True, True)) 128 results2 = cat.searchResults(used=(False, False)) 129 results1 = [x for x in results1] # Turn results generator into list 130 # We found 1 accescode used 131 assert len(results1) == 1 132 assert results1[0] is self.ac1 133 # We found 2 accesscodes not used 134 assert len(results2) == 2 135 assert [x for x in results2] == [self.ac2, self.ac3]
Note: See TracChangeset for help on using the changeset viewer.