- Timestamp:
- 20 Jun 2011, 14:59:56 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/tests/test_accesscodes.py
r6417 r6422 35 35 from zope.testing import renormalizing 36 36 from waeup.sirp.app import University 37 from waeup.sirp.interfaces import IObjectHistory 37 38 from waeup.sirp.testing import FunctionalLayer 38 39 from waeup.sirp.accesscodes.accesscodes import ( … … 179 180 fire_transition, 'APP-1-11111111', 'init') # already initialized 180 181 182 def test_fire_transition_comment(self): 183 # when we request a comment, it will also appear in history 184 fire_transition('APP-1-11111111', 'use', comment='Hi there!') 185 history = IObjectHistory(self.ac1) 186 msgs = history.messages 187 assert 'Hi there!' in msgs[-1] 188 189 def test_fire_transition_no_comment(self): 190 # without comment, the history should be without trailing garbage 191 fire_transition('APP-1-11111111', 'use') 192 history = IObjectHistory(self.ac1) 193 msgs = history.messages 194 assert msgs[-1].endswith(' - Used (new state: used)') 181 195 182 196 class AccessCodeTests(FunctionalTestCase):
Note: See TracChangeset for help on using the changeset viewer.