[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication/tests - testZopePublication.py:1.1.2.29

Jim Fulton jim@zope.com
Mon, 10 Jun 2002 10:51:47 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication/tests
In directory cvs.zope.org:/tmp/cvs-serv30254/lib/python/Zope/App/ZopePublication/tests

Modified Files:
      Tag: Zope-3x-branch
	testZopePublication.py 
Log Message:
Implemented:

http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/PathNamespaceQualificationSyntax

without a short-hand syntax for the creation namespace which may go
away.



=== Zope3/lib/python/Zope/App/ZopePublication/tests/testZopePublication.py 1.1.2.28 => 1.1.2.29 ===
 
     many views lead to a default view
-    <base href="/somepath/view::view/view_method">
+    <base href="/somepath/@@view/view_method">
 
     """
     klass = BrowserPublication
     
     def testBaseTagNoBase(self):
-        self._testBaseTags('/somepath/view::view/', '')
+        self._testBaseTags('/somepath/@@view/', '')
 
     def testBaseTag1(self):
-        self._testBaseTags('/somepath/view::view',
-                           'http://127.0.0.1/somepath/view::view/bruce')
+        self._testBaseTags('/somepath/@@view',
+                           'http://127.0.0.1/somepath/@@view/bruce')
 
     def testBaseTag2(self):
         self._testBaseTags('/somepath/',
-                           'http://127.0.0.1/somepath/view::view/bruce')
+                           'http://127.0.0.1/somepath/@@view/bruce')
 
     def testBaseTag3(self):
         self._testBaseTags('/somepath',
-                           'http://127.0.0.1/somepath/view::view/bruce')
+                           'http://127.0.0.1/somepath/@@view/bruce')
         
 
 
@@ -263,7 +263,8 @@
         self.assertEqual(unw.v, 'bruce')
 
 
-    def testTraverseSkinExtraction(self):
+    # XXX we no longer support path parameters! (At least for now)
+    def XXXtestTraverseSkinExtraction(self):
         class I1(Interface): pass
         class C: __implements__ = I1
         class BobView(DummyView): pass
@@ -273,13 +274,13 @@
         provideView=getService(None, "Views").provideView
         provideView(I1, 'edit', IBrowserPresentation, [BobView])
 
-        r = self._createRequest('/view::edit;skin=zmi',pub)
-        ob2 = pub.traverseName(r , ob, 'view::edit;skin=zmi')
+        r = self._createRequest('/@@edit;skin=zmi',pub)
+        ob2 = pub.traverseName(r , ob, '@@edit;skin=zmi')
         self.assertEqual(r.getPresentationSkin(), 'zmi')
         self.assertEqual(ob2.__class__ , BobView)
 
-        r = self._createRequest('/view::edit;skin=zmi',pub)
-        ob2 = pub.traverseName(r , ob, 'view::edit;skin=zmi')
+        r = self._createRequest('/@@edit;skin=zmi',pub)
+        ob2 = pub.traverseName(r , ob, '@@edit;skin=zmi')
         self.assertEqual(r.getPresentationSkin(), 'zmi')
         self.assertEqual(ob2.__class__ , BobView)
 
@@ -304,10 +305,10 @@
         class V:
             def __init__(self, context, request): pass
             __implements__ = IBrowserPresentation
-        r = self._createRequest('/view::spam',pub)
+        r = self._createRequest('/@@spam',pub)
         provideView=getService(None, "Views").provideView
         provideView(I, 'spam', IBrowserPresentation, [V])
-        ob2 = pub.traverseName(r, ob, 'view::spam')
+        ob2 = pub.traverseName(r, ob, '@@spam')
         self.assertEqual(removeAllProxies(ob2).__class__, V)
         self.assertEqual(getWrapperContext(ob2), ob)
 
@@ -317,8 +318,8 @@
             def getServiceManager(self):
                 return SimpleObject(1)
         ob = C()
-        r = self._createRequest('/etc::Services',pub)
-        ob2 = pub.traverseName(r, ob, 'etc::Services')
+        r = self._createRequest('/++etc++Services',pub)
+        ob2 = pub.traverseName(r, ob, '++etc++Services')
         self.assertEqual(removeAllProxies(ob2).v, 1)
         self.assertEqual(getWrapperContext(ob2), ob)
 
@@ -326,10 +327,10 @@
         from Zope.App.OFS.ApplicationControl.ApplicationControl \
              import ApplicationController
         pub = self.klass(self.db)
-        r = self._createRequest('/etc::ApplicationController;skin=zmi',pub)
-        ac = pub.traverseName(r, None, 'etc::ApplicationController;skin=zmi')
+        r = self._createRequest('/++etc++ApplicationController',pub)
+        ac = pub.traverseName(r, None, '++etc++ApplicationController')
         self.assertEqual(ac, ApplicationController)
-        r = self._createRequest('/etc::ApplicationController;skin=zmi',pub)
+        r = self._createRequest('/++etc++ApplicationController',pub)
         app = r.getPublication().getApplication(r)
         self.assertEqual(app, ApplicationController)
         self.failIf(r.getTraversalStack())