[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication/Browser/tests - testZopePublication.py:1.4

Jim Fulton jim@zope.com
Fri, 20 Dec 2002 14:45:47 -0500


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

Modified Files:
	testZopePublication.py 
Log Message:
Refactored ApplicationControl so that the application controller is no
longer a root object. Rather, to avoid traversing a database object to
get to it, we create a separate RootFolder just so we can traverse it
to get to the application controller.

We (Guido and I) also renamed the global instance to have a name
starting with a lower case name. This caused the most file changes.

To do: rip out the application controller view registry in favor of
the actions menu.



=== Zope3/lib/python/Zope/App/ZopePublication/Browser/tests/testZopePublication.py 1.3 => 1.4 ===
--- Zope3/lib/python/Zope/App/ZopePublication/Browser/tests/testZopePublication.py:1.3	Fri Dec 20 14:34:44 2002
+++ Zope3/lib/python/Zope/App/ZopePublication/Browser/tests/testZopePublication.py	Fri Dec 20 14:45:46 2002
@@ -281,15 +281,16 @@
 
     def testTraverseNameApplicationControl(self):
         from Zope.App.OFS.ApplicationControl.ApplicationControl \
-             import ApplicationController
+             import applicationController, applicationControllerRoot
         pub = self.klass(self.db)
         r = self._createRequest('/++etc++ApplicationController',pub)
-        ac = pub.traverseName(r, None, '++etc++ApplicationController')
-        self.assertEqual(ac, ApplicationController)
+        ac = pub.traverseName(r,
+                              applicationControllerRoot,
+                              '++etc++ApplicationController')
+        self.assertEqual(ac, applicationController)
         r = self._createRequest('/++etc++ApplicationController',pub)
         app = r.publication.getApplication(r)
-        self.assertEqual(app, ApplicationController)
-        self.failIf(r.getTraversalStack())
+        self.assertEqual(app, applicationControllerRoot)
 
 
 def test_suite():