[Zope3-checkins] CVS: Zope3/src/zope/app/services/tests - test_view.py:1.21
Viktorija Zaksiene
ryzaja@codeworks.lt
Fri, 4 Jul 2003 09:28:24 -0400
Update of /cvs-repository/Zope3/src/zope/app/services/tests
In directory cvs.zope.org:/tmp/cvs-serv2662/tests
Modified Files:
test_view.py
Log Message:
Fixed PageRegistration and tests for it. Now it uses module-lookup methods of
registration manager containers.
=== Zope3/src/zope/app/services/tests/test_view.py 1.20 => 1.21 ===
--- Zope3/src/zope/app/services/tests/test_view.py:1.20 Mon Jun 30 12:37:14 2003
+++ Zope3/src/zope/app/services/tests/test_view.py Fri Jul 4 09:28:19 2003
@@ -94,7 +94,6 @@
def test_implements_IViewService(self):
from zope.component.interfaces import IViewService
- from zope.interface.verify import verifyObject
verifyObject(IViewService, self._service)
@@ -202,10 +201,6 @@
implements(IServiceService)
- def resolve(self, name):
- if name == 'Foo.Bar.A':
- return A
-
class ModuleFinder:
def resolve(self, name):
@@ -244,6 +239,8 @@
default = traverse(self.rootFolder, '++etc++site/default')
self.__template = PhonyTemplate()
default.setObject('t', self.__template)
+ self.folder = ContextWrapper(ModuleFinder(), self.rootFolder)
+ self.folder = ContextWrapper(ModuleFinder(), self.folder)
def test_getView_template(self):
registration = ContextWrapper(
@@ -251,7 +248,7 @@
"Foo.Bar.A",
template='/++etc++site/default/t',
),
- self.rootFolder,
+ self.folder,
)
c = C()
@@ -273,7 +270,7 @@
"Foo.Bar.A",
attribute='run',
),
- self.rootFolder,
+ self.folder,
)
c = C()
request = TestRequest()
@@ -285,7 +282,7 @@
PageRegistration(I1, 'test', 'zope.View',
"Foo.Bar.A",
),
- self.rootFolder,
+ self.folder,
)
c = C()
request = TestRequest()