[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/tests - testContents.py:1.10

runyaga runyaga@thisbox.com
Wed, 4 Dec 2002 10:19:08 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/tests
In directory cvs.zope.org:/tmp/cvs-serv21001

Modified Files:
	testContents.py 
Log Message:
fixing tests to use (tuple)/dictioanry changes
in the Contents view 


=== Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/tests/testContents.py 1.9 => 1.10 ===
--- Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/tests/testContents.py:1.9	Tue Dec  3 12:43:48 2002
+++ Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/tests/testContents.py	Wed Dec  4 10:19:07 2002
@@ -100,7 +100,8 @@
         self.assertEqual(info['url'], 'document')
         self.assertEqual(info['object'], document)
         self.assertEqual(info['title'], 'faux title')
-        self.assertEqual(info['size'], getSize(FauxDCAdapter.size))
+        size,label=info['size']['size'],info['size']['label']
+        self.assertEqual((size,label), getSize(FauxDCAdapter.size))
         self.assertEqual(info['created'], formatTime(FauxDCAdapter.created))
         self.assertEqual(info['modified'], formatTime(FauxDCAdapter.modified))
 
@@ -111,11 +112,11 @@
                 self.size=size
             def getSize(self):
                 return self.size
-        self.assertEqual(getSize(SizeableObject(0)), u'1 KB')
-        self.assertEqual(getSize(SizeableObject(2048)), u'2 KB')
-        self.assertEqual(getSize(SizeableObject(2000000)), u'1.91 MB')
-        self.assertEqual(getSize(SizeableObject('bob')), u'N/A')
-        self.assertEqual(getSize('dobbs'), u'N/A')
+        self.assertEqual(getSize(SizeableObject(0)), (0, u'1 KB') )
+        self.assertEqual(getSize(SizeableObject(2048)), (2048, u'2 KB') )
+        self.assertEqual(getSize(SizeableObject(2000000)),(2000000,u'1.91 MB'))
+        self.assertEqual(getSize(SizeableObject('bob')), (0,u'N/A'))
+        self.assertEqual(getSize('dobbs'), (0,u'N/A'))
 
         
     def testRemove( self ):