Changeset 9126 for main/waeup.kofa/trunk/src/waeup/kofa/tests
- Timestamp:
- 30 Aug 2012, 08:11:58 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/tests/test_objecthistory.py
r9125 r9126 108 108 hist.addMessage('blah') 109 109 hist.addMessage('blow') 110 self.assertEqual(len(hist._getMessages()), 2)110 self.assertEqual(len(hist._getMessages()), 2) 111 111 result = ' '.join(hist.messages) 112 112 self.assertTrue('blah by Bob' in result) 113 113 self.assertTrue('blow by Bob' in result) 114 hist.removeMessage(1) 115 self.assertEqual(len(hist._getMessages()),1) 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) 116 124 result = ' '.join(hist.messages) 117 125 self.assertFalse('blow by Bob' in result)
Note: See TracChangeset for help on using the changeset viewer.