[Zope3-checkins] CVS: Zope3/src/zope/app/publication/tests -
test_browserpublication.py:1.25
test_simplecomponenttraverser.py:1.10
test_xmlrpcpublication.py:1.6 test_zopepublication.py:1.27
Jim Fulton
jim at zope.com
Mon Mar 15 15:42:40 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/publication/tests
In directory cvs.zope.org:/tmp/cvs-serv3290/src/zope/app/publication/tests
Modified Files:
test_browserpublication.py test_simplecomponenttraverser.py
test_xmlrpcpublication.py test_zopepublication.py
Log Message:
Adapters and views are now registered with a single factory, not a
sequence of factories.
=== Zope3/src/zope/app/publication/tests/test_browserpublication.py 1.24 => 1.25 ===
--- Zope3/src/zope/app/publication/tests/test_browserpublication.py:1.24 Mon Mar 8 07:05:59 2004
+++ Zope3/src/zope/app/publication/tests/test_browserpublication.py Mon Mar 15 15:42:09 2004
@@ -120,9 +120,9 @@
pub = BrowserPublication(self.db)
- ztapi.browserView(I1, 'view', [DummyView])
+ ztapi.browserView(I1, 'view', DummyView)
ztapi.setDefaultViewName(I1, 'view')
- ztapi.browserView(None, '_traverse', [TestTraverser])
+ ztapi.browserView(None, '_traverse', TestTraverser)
ob = O1()
@@ -173,7 +173,7 @@
self.counter += 1
return self.context[name]
- ztapi.browserView(I1, '_traverse', [Adapter])
+ ztapi.browserView(I1, '_traverse', Adapter)
ob = mydict()
ob['bruce'] = SimpleObject('bruce')
ob['bruce2'] = SimpleObject('bruce2')
@@ -192,7 +192,7 @@
def browserDefault(self, request):
return (self.context['bruce'], 'dummy')
- ztapi.browserView(I1, '_traverse', [Adapter])
+ ztapi.browserView(I1, '_traverse', Adapter)
ob = mydict()
ob['bruce'] = SimpleObject('bruce')
ob['bruce2'] = SimpleObject('bruce2')
@@ -211,7 +211,7 @@
pub = self.klass(self.db)
ob = C()
- ztapi.browserView(I1, 'edit', [BobView])
+ ztapi.browserView(I1, 'edit', BobView)
r = self._createRequest('/@@edit;skin=zmi',pub)
ob2 = pub.traverseName(r , ob, '@@edit;skin=zmi')
@@ -229,7 +229,7 @@
x = SimpleObject(1)
ob = C()
r = self._createRequest('/x',pub)
- ztapi.browserView(None, '_traverse', [TestTraverser])
+ ztapi.browserView(None, '_traverse', TestTraverser)
ob2 = pub.traverseName(r, ob, 'x')
self.assertRaises(ForbiddenAttribute, getattr, ob2, 'v')
self.assertEqual(removeAllProxies(ob2).v, 1)
@@ -243,7 +243,7 @@
class V:
def __init__(self, context, request): pass
r = self._createRequest('/@@spam',pub)
- ztapi.browserView(I, 'spam', [V])
+ ztapi.browserView(I, 'spam', V)
ob2 = pub.traverseName(r, ob, '@@spam')
self.assertEqual(ob2.__class__, V)
=== Zope3/src/zope/app/publication/tests/test_simplecomponenttraverser.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/publication/tests/test_simplecomponenttraverser.py:1.9 Sat Mar 13 18:55:15 2004
+++ Zope3/src/zope/app/publication/tests/test_simplecomponenttraverser.py Mon Mar 15 15:42:09 2004
@@ -66,7 +66,7 @@
req = Request(I, '')
T = SimpleComponentTraverser(c, req)
- getService(None, Presentation).provideView(None , 'foo', I, [View])
+ getService(None, Presentation).provideView(None , 'foo', I, View)
self.failUnless(T.publishTraverse(req,'foo').__class__ is View )
=== Zope3/src/zope/app/publication/tests/test_xmlrpcpublication.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/publication/tests/test_xmlrpcpublication.py:1.5 Sat Mar 13 18:55:20 2004
+++ Zope3/src/zope/app/publication/tests/test_xmlrpcpublication.py Mon Mar 15 15:42:09 2004
@@ -52,7 +52,7 @@
ob = C()
r = self._createRequest('/x', pub)
provideView=getService(None, Presentation).provideView
- provideView(None, '_traverse', IXMLRPCRequest, [TestTraverser])
+ provideView(None, '_traverse', IXMLRPCRequest, TestTraverser)
ob2 = pub.traverseName(r, ob, 'x')
self.assertEqual(removeAllProxies(ob2).v, 1)
@@ -76,7 +76,7 @@
r = self._createRequest('/foo', pub)
provideView=getService(None, Presentation).provideView
setDefaultViewName=getService(None, Presentation).setDefaultViewName
- provideView(I, 'view', IXMLRPCPresentation, [V])
+ provideView(I, 'view', IXMLRPCPresentation, V)
setDefaultViewName(I, IXMLRPCPresentation, 'view')
self.assertRaises(NotFound, pub.traverseName, r, ob, 'foo')
@@ -99,7 +99,7 @@
r = self._createRequest('/@@spam', pub)
provideView=getService(None, Presentation).provideView
- provideView(I, 'spam', IXMLRPCRequest, [V])
+ provideView(I, 'spam', IXMLRPCRequest, V)
ob2 = pub.traverseName(r, ob, '@@spam')
self.assertEqual(removeAllProxies(ob2).__class__, V)
@@ -130,7 +130,7 @@
r = self._createRequest('/spam', pub)
provideView=getService(None, Presentation).provideView
setDefaultViewName=getService(None, Presentation).setDefaultViewName
- provideView(I, 'view', IXMLRPCRequest, [V])
+ provideView(I, 'view', IXMLRPCRequest, V)
setDefaultViewName(I, IXMLRPCRequest, 'view')
ob2 = pub.traverseName(r, ob, '@@spam')
=== Zope3/src/zope/app/publication/tests/test_zopepublication.py 1.26 => 1.27 ===
--- Zope3/src/zope/app/publication/tests/test_zopepublication.py:1.26 Sat Mar 13 18:55:20 2004
+++ Zope3/src/zope/app/publication/tests/test_zopepublication.py Mon Mar 15 15:42:09 2004
@@ -180,7 +180,7 @@
view_text = 'You had a conflict error'
s = zapi.getService(None, zapi.servicenames.Presentation)
s.provideView(IConflictError, 'name', self.presentation_type,
- [lambda obj,request: lambda: view_text])
+ lambda obj, request: lambda: view_text)
try:
raise ConflictError
except:
More information about the Zope3-Checkins
mailing list