Did I find the right examples for you? yes no

All Samples(16)  |  Call(12)  |  Derive(0)  |  Import(4)

src/z/o/zope.app.session-3.6.2/src/zope/app/session/tests.py   zope.app.session(Download)
from zope.app.publication.interfaces import IBeforeTraverseEvent
from zope.app.testing.functional import BrowserTestCase
from zope.app.zptpage.zptpage import ZPTPage
 
from zope.app.session.testing import SessionLayer
    def setUp(self):
        BrowserTestCase.setUp(self)
        page = ZPTPage()
        page.source = self.content
        page.evaluateInlineCode = True
    def setUp(self):
        super(VirtualHostSessionTest, self).setUp()
        page = ZPTPage()
        page.source = u'<div>Foo</div>'
        page.evaluateInlineCode = True

src/z/o/zope.app.zptpage-3.5.1/src/zope/app/zptpage/textindex/tests.py   zope.app.zptpage(Download)
from zope.app.zptpage.interfaces import IZPTPage
from zope.app.zptpage.textindex.zptpage import SearchableText
from zope.app.zptpage.zptpage import ZPTPage
import unittest
 
    def testSearchableText(self):
        page = ZPTPage()
        searchableText = ISearchableText(page)
 
        utext = u'another test\n' # The source will grow a newline if ommited

src/z/o/zope.app.zptpage-3.5.1/src/zope/app/zptpage/tests/test_zptpage.py   zope.app.zptpage(Download)
 
from zope.app.zptpage.interfaces import IZPTPage
from zope.app.zptpage.zptpage import ZPTPage, ZPTSourceView,\
     ZPTReadFile, ZPTWriteFile, ZPTFactory
from zope.app.zptpage.zptpage import Sized
    def testZPTRendering(self):
        page = ZPTPage()
        page.setSource(
            u''
            '<html>'
    def test_request_protected(self):
        page = ZPTPage()
        page.setSource(
            u'<p tal:content="python: request.__dict__" />'
            )
        ztapi.browserView(IZPTPage, 'name', AU)
 
        page = ZPTPage()
        page.setSource(
            u'<p tal:replace="template/@@name" />'
    def test_source_file(self):
        page = ZPTPage()
        self.assert_(page.pt_source_file() is None)
 
        page = self.pageInContext(page)

src/z/o/zope.app.zptpage-3.5.1/src/zope/app/zptpage/browser/tests.py   zope.app.zptpage(Download)
from zope.testing import renormalizing
from zope.app.testing.functional import BrowserTestCase
from zope.app.zptpage.zptpage import ZPTPage
from xml.sax.saxutils import escape
from zope.app.zptpage.testing import ZPTPageLayer
    def addZPTPage(self):
        zptpage = ZPTPage()
        zptpage.source = self.content
        root = self.getRootFolder()
        root['zptpage'] = zptpage