"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Products/PageTemplates/tests/testHTMLTests.py" between
Zope-5.1.2.tar.gz and Zope-5.2.tar.gz

About: Zope Z Object Publishing Environment - web application platform used for building content management systems, intranets, portals, and custom applications.

testHTMLTests.py  (Zope-5.1.2):testHTMLTests.py  (Zope-5.2)
skipping to change at line 29 skipping to change at line 29
from AccessControl import SecurityManager from AccessControl import SecurityManager
from AccessControl.SecurityManagement import noSecurityManager from AccessControl.SecurityManagement import noSecurityManager
from Acquisition import Implicit from Acquisition import Implicit
from Products.PageTemplates.interfaces import IUnicodeEncodingConflictResolver from Products.PageTemplates.interfaces import IUnicodeEncodingConflictResolver
from Products.PageTemplates.PageTemplate import PageTemplate from Products.PageTemplates.PageTemplate import PageTemplate
from Products.PageTemplates.tests import util from Products.PageTemplates.tests import util
from Products.PageTemplates.unicodeconflictresolver import \ from Products.PageTemplates.unicodeconflictresolver import \
DefaultUnicodeEncodingConflictResolver DefaultUnicodeEncodingConflictResolver
from Products.PageTemplates.unicodeconflictresolver import \ from Products.PageTemplates.unicodeconflictresolver import \
PreferredCharsetResolver PreferredCharsetResolver
from zExceptions import NotFound
from zope.component import provideUtility from zope.component import provideUtility
from zope.traversing.adapters import DefaultTraversable from zope.traversing.adapters import DefaultTraversable
from .util import useChameleonEngine from .util import useChameleonEngine
class AqPageTemplate(Implicit, PageTemplate): class AqPageTemplate(Implicit, PageTemplate):
pass pass
class Folder(util.Base): class Folder(util.Base):
pass pass
skipping to change at line 154 skipping to change at line 155
def testNotExpression(self): def testNotExpression(self):
self.assert_expected(self.folder.t, 'CheckNotExpression.html') self.assert_expected(self.folder.t, 'CheckNotExpression.html')
def testPathNothing(self): def testPathNothing(self):
self.assert_expected(self.folder.t, 'CheckPathNothing.html') self.assert_expected(self.folder.t, 'CheckPathNothing.html')
def testPathAlt(self): def testPathAlt(self):
self.assert_expected(self.folder.t, 'CheckPathAlt.html') self.assert_expected(self.folder.t, 'CheckPathAlt.html')
def testPathTraverse(self):
# need to perform this test with a "real" folder
from OFS.Folder import Folder
f = self.folder
self.folder = Folder()
self.folder.t, self.folder.laf = f.t, f.laf
self.folder.laf.write('ok')
self.assert_expected(self.folder.t, 'CheckPathTraverse.html')
def testBatchIteration(self): def testBatchIteration(self):
self.assert_expected(self.folder.t, 'CheckBatchIteration.html') self.assert_expected(self.folder.t, 'CheckBatchIteration.html')
def testUnicodeInserts(self): def testUnicodeInserts(self):
self.assert_expected_unicode(self.folder.t, 'CheckUnicodeInserts.html') self.assert_expected_unicode(self.folder.t, 'CheckUnicodeInserts.html')
def testI18nTranslate(self): def testI18nTranslate(self):
self.assert_expected(self.folder.t, 'CheckI18nTranslate.html') self.assert_expected(self.folder.t, 'CheckI18nTranslate.html')
def testImportOldStyleClass(self): def testImportOldStyleClass(self):
skipping to change at line 206 skipping to change at line 216
self.assert_expected(self.folder.t, 'Default.html') self.assert_expected(self.folder.t, 'Default.html')
def testSwitch(self): def testSwitch(self):
self.assert_expected(self.folder.t, 'switch.html') self.assert_expected(self.folder.t, 'switch.html')
def test_unicode_conflict_resolution(self): def test_unicode_conflict_resolution(self):
# override with the more "demanding" resolver # override with the more "demanding" resolver
provideUtility(PreferredCharsetResolver) provideUtility(PreferredCharsetResolver)
t = PageTemplate() t = PageTemplate()
self.assert_expected(t, 'UnicodeResolution.html') self.assert_expected(t, 'UnicodeResolution.html')
def test_underscore_traversal(self):
t = self.folder.t
t.write('<p tal:define="p context/__class__" />')
with self.assertRaises(NotFound):
t()
t.write('<p tal:define="p nocall: random/_itertools/repeat"/>')
with self.assertRaises(NotFound):
t()
t.write('<p tal:content="random/_itertools/repeat/foobar"/>')
with self.assertRaises(NotFound):
t()
 End of changes. 3 change blocks. 
0 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)