[Zope-Checkins] CVS: Zope/lib/python/DocumentTemplate/tests - testDTML.py:1.5.8.1

Shane Hathaway shane@digicool.com
Thu, 9 Aug 2001 13:34:02 -0400


Update of /cvs-repository/Zope/lib/python/DocumentTemplate/tests
In directory cvs.zope.org:/tmp/cvs-serv29115/lib/python/DocumentTemplate/tests

Modified Files:
      Tag: NR-branch
	testDTML.py 
Log Message:
Sync NR-branch with trunk.  Sorry about so many checkin messages...


=== Zope/lib/python/DocumentTemplate/tests/testDTML.py 1.5 => 1.5.8.1 ===
 from ExtensionClass import Base
 class D:
+    __allow_access_to_unprotected_subobjects__ = 1
+
     def __init__(self, **kw):
         for k, v in kw.items(): self.__dict__[k]=v
 
@@ -476,7 +478,7 @@
    andrew, 5
    chessie, 2
 """
-        result = HTML(html)(data=data)
+        result = self.doc_class(html)(data=data)
         assert result == expected, result
 
     def checkBasicHTMLIn2(self):
@@ -491,7 +493,16 @@
    2
    3
 """
-        result = HTML(html)(xxx=xxx)
+        result = self.doc_class(html)(xxx=xxx)
+        assert result == expected, result
+
+    def checkBasicHTMLIn3(self):
+        ns = {'prop_ids': ('title', 'id'), 'title': 'good', 'id': 'times'}
+        html = """:<dtml-in prop_ids><dtml-var sequence-item>=<dtml-var
+        expr="_[_['sequence-item']]">:</dtml-in>"""
+        result = self.doc_class(html)(None, ns)
+        expected = ":title=good:id=times:"
+
         assert result == expected, result
 
     def checkHTMLInElse(self):
@@ -510,7 +521,7 @@
 2
 3
 """
-        result = HTML(html)(xxx=xxx, data={})
+        result = self.doc_class(html)(xxx=xxx, data={})
         assert result == expected, result
         
     def checkBasicStringIn(self):