[Zope3-checkins] CVS: Zope3/src/zope/app/publication/tests - test_zopepublication.py:1.33

Jim Fulton jim at zope.com
Sun Apr 18 12:01:03 EDT 2004


Update of /cvs-repository/Zope3/src/zope/app/publication/tests
In directory cvs.zope.org:/tmp/cvs-serv12900/src/zope/app/publication/tests

Modified Files:
	test_zopepublication.py 
Log Message:
Changed way namespace handlers (handlers for traversing names of the
form "++namespace++name") are registered.  Now the are registered as
views and adapters.  When traversing a namespace-qualified view, a
request is sometimes provided.  When a request is provided, a view
will be used to traverse the name. Otherwise, an adapter is used.
handlers that don't care about the request are registered as both an
adapter and a view.

With this change, it's not possible to have content-specific
namespace-specific traversers.  Content objects can now define
specialized namespaces.


=== Zope3/src/zope/app/publication/tests/test_zopepublication.py 1.32 => 1.33 ===
--- Zope3/src/zope/app/publication/tests/test_zopepublication.py:1.32	Mon Apr  5 04:16:03 2004
+++ Zope3/src/zope/app/publication/tests/test_zopepublication.py	Sun Apr 18 12:00:32 2004
@@ -131,11 +131,10 @@
         connection.close()
         self.app = app
 
-        from zope.app.traversing.namespace import provideNamespaceHandler
         from zope.app.traversing.namespace import view, resource, etc
-        provideNamespaceHandler('view', view)
-        provideNamespaceHandler('resource', resource)
-        provideNamespaceHandler('etc', etc)
+        ztapi.provideNamespaceHandler('view', view)
+        ztapi.provideNamespaceHandler('resource', resource)
+        ztapi.provideNamespaceHandler('etc', etc)
 
         self.out = StringIO()
         self.request = TestRequest('/f1/f2', outstream=self.out)




More information about the Zope3-Checkins mailing list