[Zope-Checkins] CVS: Zope/lib/python/DocumentTemplate/tests - testDTML.py:1.10.44.1
Toby Dickenson
tdickenson@geminidataloggers.com
Mon, 22 Apr 2002 07:48:00 -0400
Update of /cvs-repository/Zope/lib/python/DocumentTemplate/tests
In directory cvs.zope.org:/tmp/cvs-serv23219/tests
Modified Files:
Tag: toby-dtml-in-namespace-branch
testDTML.py
Log Message:
added changes to dtml-in to prevent namespace pollution, as explained in collector item 358
=== Zope/lib/python/DocumentTemplate/tests/testDTML.py 1.10 => 1.10.44.1 ===
+ def testNoItemPush(self):
+ data=d(sec='B', name='XXX', sub=(d(name='b1'),d(name='b2',sec='XXX')))
+ html = """
+<dtml-with data mapping><dtml-in sub no_push_item>
+ <dtml-var sec>.<dtml-with sequence-item mapping><dtml-var name></dtml-with>
+</dtml-in></dtml-with>
+"""
+ expected = """
+ B.b1 B.b2"""
+ result = self.doc_class(html)(data=data)
+ assert result == expected, result
+
def testBasicHTMLIn(self):
data=(
d(name='jim', age=39),