[Zope3-checkins] CVS: Zope3/src/zope/app/tests - test_size.py:1.5

Stephan Richter srichter at cosmos.phy.tufts.edu
Wed Aug 6 11:45:21 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/tests
In directory cvs.zope.org:/tmp/cvs-serv18235/app/tests

Modified Files:
	test_size.py 
Log Message:
Mainly I18n of the ISized adapters.


=== Zope3/src/zope/app/tests/test_size.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/tests/test_size.py:1.4	Thu Mar 13 13:49:11 2003
+++ Zope3/src/zope/app/tests/test_size.py	Wed Aug  6 10:45:17 2003
@@ -63,18 +63,22 @@
 
         sized = DefaultSized(DummyObject(2048))
         self.assertEqual(sized.sizeForSorting(), ('byte', 2048))
-        self.assertEqual(sized.sizeForDisplay(), u'2 KB')
+        self.assertEqual(sized.sizeForDisplay(), u'${size} KB')
+        self.assertEqual(sized.sizeForDisplay().mapping, {'size': '2'})
 
         sized = DefaultSized(DummyObject(2000000))
         self.assertEqual(sized.sizeForSorting(), ('byte', 2000000))
-        self.assertEqual(sized.sizeForDisplay(), u'1.91 MB')
+        self.assertEqual(sized.sizeForDisplay(), u'${size} MB')
+        self.assertEqual(sized.sizeForDisplay().mapping, {'size': '1.91'})
 
     def test_byteDisplay(self):
         from zope.app.size import byteDisplay
         self.assertEqual(byteDisplay(0), u'0 KB')
         self.assertEqual(byteDisplay(1), u'1 KB')
-        self.assertEqual(byteDisplay(2048), u'2 KB')
-        self.assertEqual(byteDisplay(2000000), u'1.91 MB')
+        self.assertEqual(byteDisplay(2048), u'${size} KB')
+        self.assertEqual(byteDisplay(2048).mapping, {'size': '2'})
+        self.assertEqual(byteDisplay(2000000), u'${size} MB')
+        self.assertEqual(byteDisplay(2000000).mapping, {'size': '1.91'})
 
 def test_suite():
     loader = unittest.TestLoader()




More information about the Zope3-Checkins mailing list