[Checkins] SVN: five.pt/trunk/src/five/pt/tests/ Test that ``test`` function is available.
Malthe Borch
mborch at gmail.com
Fri Jul 15 02:29:49 EDT 2011
Log message for revision 122253:
Test that ``test`` function is available.
Changed:
U five.pt/trunk/src/five/pt/tests/locals.pt
U five.pt/trunk/src/five/pt/tests/test_pagetemplate.py
-=-
Modified: five.pt/trunk/src/five/pt/tests/locals.pt
===================================================================
--- five.pt/trunk/src/five/pt/tests/locals.pt 2011-07-15 06:25:39 UTC (rev 122252)
+++ five.pt/trunk/src/five/pt/tests/locals.pt 2011-07-15 06:29:49 UTC (rev 122253)
@@ -1,10 +1,12 @@
<div xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal">
- <div tal:replace="string:view:${view/available}" />
+ <div tal:replace="string:view:${view/available|nothing}" />
<div tal:replace="python:'here==context:'+str(here==context)" />
<div tal:replace="python:'here==container:'+str(here==container)" />
<div tal:replace="string:root:${root/getPhysicalPath}" />
<div tal:replace="string:nothing:${nothing}" />
<div tal:define="cgi python:modules['cgi']"
tal:replace="python: dir(cgi)" />
+ <div tal:define="test nocall: test|nothing" tal:replace="python: test" />
+ <div tal:define="same nocall: same_type|nothing" tal:replace="python: same" />
</div>
Modified: five.pt/trunk/src/five/pt/tests/test_pagetemplate.py
===================================================================
--- five.pt/trunk/src/five/pt/tests/test_pagetemplate.py 2011-07-15 06:25:39 UTC (rev 122252)
+++ five.pt/trunk/src/five/pt/tests/test_pagetemplate.py 2011-07-15 06:29:49 UTC (rev 122253)
@@ -20,6 +20,12 @@
return PageTemplateFile(os.path.join(path, name)).\
__of__(self.app)
+ def test_locals(self):
+ template = self._makeOne('locals.pt')
+ result = template()
+ self.failUnless('function test' in result)
+ self.failUnless('function same_type' in result)
+
def test_locals_base(self):
template = self._makeOne('locals_base.pt')
result = template()
More information about the checkins
mailing list