[Zope-CVS] CVS: Products/BTreeFolder2/tests -
testBTreeFolder2.py:1.8
Shane Hathaway
shane at zope.com
Mon Mar 15 15:31:41 EST 2004
Update of /cvs-repository/Products/BTreeFolder2/tests
In directory cvs.zope.org:/tmp/cvs-serv32533/tests
Modified Files:
testBTreeFolder2.py
Log Message:
Added a test of the fix for visiting objects with trailing spaces.
Also used the standard cgi.escape() rather than saxutils.
cgi.escape() always generates HTML, while saxutils.quoteattr()
sometimes takes advantage of XML features not present in HTML.
=== Products/BTreeFolder2/tests/testBTreeFolder2.py 1.7 => 1.8 ===
--- Products/BTreeFolder2/tests/testBTreeFolder2.py:1.7 Mon Feb 9 15:58:34 2004
+++ Products/BTreeFolder2/tests/testBTreeFolder2.py Mon Mar 15 15:31:40 2004
@@ -185,6 +185,16 @@
self.assert_(info['formatted_list'].find('item') < 0)
self.assert_(info['formatted_list'].find('somefolder') > 0)
+ def testObjectListingWithSpaces(self):
+ # The option list must use value attributes to preserve spaces.
+ name = " some folder "
+ f2 = BTreeFolder2(name)
+ self.f._setObject(f2.id, f2)
+ self.f.absolute_url = lambda: ''
+ info = self.f.getBatchObjectListing()
+ expect = '<option value="%s">%s</option>' % (name, name)
+ self.assert_(info['formatted_list'].find(expect) > 0)
+
def testCleanup(self):
self.assert_(self.f._cleanup())
key = TrojanKey('a')
More information about the Zope-CVS
mailing list