Ignore:
Timestamp:
21 Sep 2012, 08:19:35 (12 years ago)
Author:
uli
Message:

Rollback r9209. Looks like multiple merges from trunk confuse svn when merging back into trunk.

Location:
main/waeup.kofa/branches/uli-zc-async
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/branches/uli-zc-async

  • main/waeup.kofa/branches/uli-zc-async/src/waeup/kofa/tests/test_objecthistory.py

    r9209 r9211  
    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 
    103     def test_remove_message(self):
    104         principal = Principal('bob')
    105         principal.title = 'Bob'
    106         newInteraction(Participation(principal)) # set current user
    107         hist = IObjectHistory(self.obj)
    108         hist.addMessage('blah')
    109         hist.addMessage('blow')
    110         self.assertEqual(len(hist._getMessages()), 2)
    111         result = ' '.join(hist.messages)
    112         self.assertTrue('blah by Bob' in result)
    113         self.assertTrue('blow by Bob' in result)
    114         success, text = hist.removeMessage('xyz')
    115         self.assertFalse(success)
    116         self.assertEqual(text, 'Not a number')
    117         success, text = hist.removeMessage(100)
    118         self.assertFalse(success)
    119         self.assertEqual(text, 'Number out of range')
    120         success, text = hist.removeMessage(1)
    121         self.assertTrue(success)
    122         self.assertMatches('<YYYY-MM-DD hh:mm:ss> UTC - blow by Bob', text)
    123         self.assertEqual(len(hist.messages), 1)
    124         result = ' '.join(hist.messages)
    125         self.assertFalse('blow by Bob' in result)
    126 
    12793    def test_messages(self):
    12894        # we get messages as a persistent list of strings
Note: See TracChangeset for help on using the changeset viewer.