Ignore:
Timestamp:
18 Jul 2012, 06:47:21 (13 years ago)
Author:
Henrik Bettermann
Message:

ObjectHistory? method, helper function and view to modify (manipulate) student history messages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/tests/test_objecthistory.py

    r8234 r9012  
    9191        self.assertMatches('<YYYY-MM-DD hh:mm:ss> UTC - blah by Bob', result)
    9292
     93    def test_modify_messages(self):
     94        principal = Principal('bob')
     95        principal.title = 'Bob'
     96        newInteraction(Participation(principal)) # set current user
     97        hist = IObjectHistory(self.obj)
     98        hist.addMessage('blah')
     99        hist.modifyMessages('blah', 'blow')
     100        result = ''.join(hist.messages)
     101        self.assertMatches('<YYYY-MM-DD hh:mm:ss> UTC - blow by Bob', result)
     102
    93103    def test_messages(self):
    94104        # we get messages as a persistent list of strings
Note: See TracChangeset for help on using the changeset viewer.