[Zope3-checkins]
CVS: Zope3/src/zope/app/browser/skins/rotterdam/tests
- test_xmlnavigationviews.py:1.8.6.1
Jim Fulton
cvs-admin at zope.org
Sun Nov 9 11:08:45 EST 2003
Update of /cvs-repository/Zope3/src/zope/app/browser/skins/rotterdam/tests
In directory cvs.zope.org:/tmp/cvs-serv15349/src/zope/app/browser/skins/rotterdam/tests
Modified Files:
Tag: adaptergeddon-branch
test_xmlnavigationviews.py
Log Message:
Created a global presentation service that replaces the
global view, resource, and skin services.
Now look up presentation components by adapting from a request type,
rather than adapting to a presentation type.
=== Zope3/src/zope/app/browser/skins/rotterdam/tests/test_xmlnavigationviews.py 1.8 => 1.8.6.1 ===
--- Zope3/src/zope/app/browser/skins/rotterdam/tests/test_xmlnavigationviews.py:1.8 Sun Sep 21 13:30:41 2003
+++ Zope3/src/zope/app/browser/skins/rotterdam/tests/test_xmlnavigationviews.py Sun Nov 9 11:08:12 2003
@@ -20,13 +20,17 @@
#import sys
#sys.path.insert(0, r"c:\Zope3\src")
+from zope.app.tests import ztapi
+from zope.app.content.file import File
+from zope.app.traversing import traverse
from zope.interface import implements
from unittest import TestCase, TestLoader, TextTestRunner
from zope.app.services.tests.eventsetup import EventSetup
from zope.pagetemplate.tests.util import check_xml
+from zope.publisher.interfaces.browser import IBrowserPublisher
from zope.app.browser.skins.rotterdam.tests import util
from zope.app.browser.skins.rotterdam.xmlobject \
- import ReadContainerXmlObjectView
+ import ReadContainerXmlObjectView
from zope.app.interfaces.container import IReadContainer
from zope.app.browser.skins.rotterdam.xmlobject import XmlObjectView
from zope.publisher.browser import TestRequest
@@ -50,15 +54,11 @@
treeView = rcxov(self.rootFolder, TestRequest()).children
check_xml(treeView(), util.read_output('test4.xml'))
- from zope.app.content.file import File
- from zope.app.traversing import traverse
file1 = File()
self.folder1_1_1["file1"] = file1
self.file1 = traverse(self.rootFolder,
'/folder1/folder1_1/folder1_1_1/file1')
- from zope.component.view import provideView
- from zope.publisher.interfaces.browser import IBrowserPresentation
- from zope.publisher.interfaces.browser import IBrowserPublisher
+
class ReadContainerView(ReadContainerXmlObjectView):
implements(IBrowserPublisher)
def browserDefault(self, request):
@@ -67,8 +67,9 @@
raise NotFoundError(self, name, request)
def __call__(self):
return self.singleBranchTree()
- provideView(IReadContainer, 'singleBranchTree.xml',
- IBrowserPresentation, ReadContainerView)
+
+ ztapi.browserView(IReadContainer, 'singleBranchTree.xml',
+ ReadContainerView)
treeView = rcxov(self.folder1_1_1, TestRequest()).singleBranchTree
check_xml(treeView(), util.read_output('test5.xml'))
More information about the Zope3-Checkins
mailing list