[Zope-Checkins] CVS: Zope2 - testDTML.py:1.6
shane@digicool.com
shane@digicool.com
Mon, 2 Jul 2001 12:30:47 -0400 (EDT)
Update of /cvs-repository/Zope2/lib/python/DocumentTemplate/tests
In directory korak.digicool.com:/tmp/cvs-serv26143/tests
Modified Files:
testDTML.py
Log Message:
Collector #2357
--- Updated File testDTML.py in package Zope2 --
--- testDTML.py 2001/05/23 18:03:37 1.5
+++ testDTML.py 2001/07/02 16:30:46 1.6
@@ -108,6 +108,8 @@
from DocumentTemplate import HTML, String
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):