[Zope3-checkins] CVS: Products3/demo/messageboard/step6/tests - test_size.py:1.2
Stephan Richter
srichter@cosmos.phy.tufts.edu
Fri, 11 Jul 2003 09:55:25 -0400
Update of /cvs-repository/Products3/demo/messageboard/step6/tests
In directory cvs.zope.org:/tmp/cvs-serv25748
Modified Files:
test_size.py
Log Message:
Oy, forgot to run tests after doing the I18n stuff. Fixed now.
=== Products3/demo/messageboard/step6/tests/test_size.py 1.1 => 1.2 ===
--- Products3/demo/messageboard/step6/tests/test_size.py:1.1 Thu Jul 10 16:34:16 2003
+++ Products3/demo/messageboard/step6/tests/test_size.py Fri Jul 11 09:55:20 2003
@@ -37,20 +37,30 @@
def test_sizeForDisplay(self):
size = MessageSized(Message())
- self.assertEqual('0 replies, 0 attachments',
- size.sizeForDisplay())
+ self.assertEqual('${messages} replies, ${attach} attachments',
+ str(size.sizeForDisplay()))
+ self.assertEqual({'attach': '0', 'messages': '0'},
+ size.sizeForDisplay().mapping)
size._message.setObject('msg1', Message())
- self.assertEqual('1 reply, 0 attachments',
+ self.assertEqual('1 reply, ${attach} attachments',
size.sizeForDisplay())
+ self.assertEqual({'attach': '0', 'messages': '1'},
+ size.sizeForDisplay().mapping)
size._message.setObject('msg2', Message())
- self.assertEqual('2 replies, 0 attachments',
+ self.assertEqual('${messages} replies, ${attach} attachments',
size.sizeForDisplay())
+ self.assertEqual({'attach': '0', 'messages': '2'},
+ size.sizeForDisplay().mapping)
size._message.setObject('att1', Stub())
- self.assertEqual('2 replies, 1 attachment',
+ self.assertEqual('${messages} replies, 1 attachment',
size.sizeForDisplay())
+ self.assertEqual({'attach': '1', 'messages': '2'},
+ size.sizeForDisplay().mapping)
size._message.setObject('att2', Stub())
- self.assertEqual('2 replies, 2 attachments',
- size.sizeForDisplay())
+ self.assertEqual('${messages} replies, ${attach} attachments',
+ str(size.sizeForDisplay()))
+ self.assertEqual({'attach': '2', 'messages': '2'},
+ size.sizeForDisplay().mapping)
def test_suite():
return unittest.TestSuite((